Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/40651 )
Change subject: usb_device: Fix memory leak ......................................................................
usb_device: Fix memory leak
Change-Id: I19c91ae881895ecc4ea85dcfd40a69bb58289a60 Found-by: Coverity Scan #1420203 Signed-off-by: Patrick Georgi pgeorgi@google.com --- M usb_device.c 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/51/40651/1
diff --git a/usb_device.c b/usb_device.c index 48833fb..344c4cb 100644 --- a/usb_device.c +++ b/usb_device.c @@ -226,6 +226,8 @@ &descriptor)); if (ret != 0) { msg_perr("USB: Failed to get device descriptor"); + free(*devices); + *devices = NULL; return ret; }
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40651 )
Change subject: usb_device: Fix memory leak ......................................................................
Patch Set 1: Code-Review+1
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40651 )
Change subject: usb_device: Fix memory leak ......................................................................
Patch Set 1: Code-Review+2
Stefan Reinauer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40651 )
Change subject: usb_device: Fix memory leak ......................................................................
Patch Set 1: Code-Review+2
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40651 )
Change subject: usb_device: Fix memory leak ......................................................................
Patch Set 1: Code-Review+2
Angel Pons has submitted this change. ( https://review.coreboot.org/c/flashrom/+/40651 )
Change subject: usb_device: Fix memory leak ......................................................................
usb_device: Fix memory leak
Change-Id: I19c91ae881895ecc4ea85dcfd40a69bb58289a60 Found-by: Coverity Scan #1420203 Signed-off-by: Patrick Georgi pgeorgi@google.com Reviewed-on: https://review.coreboot.org/c/flashrom/+/40651 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Stefan Reinauer stefan.reinauer@coreboot.org Reviewed-by: Edward O'Callaghan quasisec@chromium.org --- M usb_device.c 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Stefan Reinauer: Looks good to me, approved Paul Menzel: Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved Edward O'Callaghan: Looks good to me, approved
diff --git a/usb_device.c b/usb_device.c index 48833fb..344c4cb 100644 --- a/usb_device.c +++ b/usb_device.c @@ -226,6 +226,8 @@ &descriptor)); if (ret != 0) { msg_perr("USB: Failed to get device descriptor"); + free(*devices); + *devices = NULL; return ret; }