vaibhav has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/62968 )
Change subject: src/acpi/acpigen_usb.c: Fix Memory leak error ......................................................................
src/acpi/acpigen_usb.c: Fix Memory leak error
Fix Memory leak error detected by scan-build for: https://coreboot.org/scan-build/EMULATION_QEMU_X86_I440FX-scanbuild/
Signed-off-by: Vaibhav Sethia vrockz747@gmail.com Change-Id: Ifed611bd0b9c1da3678386bff33bca3eac0311b4 --- M src/acpi/acpigen_usb.c 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/62968/1
diff --git a/src/acpi/acpigen_usb.c b/src/acpi/acpigen_usb.c index e32dfc4..ae175d0 100644 --- a/src/acpi/acpigen_usb.c +++ b/src/acpi/acpigen_usb.c @@ -4,6 +4,7 @@ #include <acpi/acpi_pld.h> #include <acpi/acpigen.h> #include <acpi/acpigen_usb.h> +#include <stdlib.h>
static const char *power_role_to_str(enum usb_typec_power_role power_role) { @@ -85,6 +86,7 @@ fresh = strdup(path); if (fresh) acpi_dp_add_reference(dsd, prop_name, fresh); + free(fresh); } }