Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/40650 )
Change subject: raiden_debug_spi: Fix memleak ......................................................................
raiden_debug_spi: Fix memleak
Change-Id: I2701a8fbae63657edc9cc258666cc951f92b1115 Found-by: Coverity Scan #1420204 Signed-off-by: Patrick Georgi pgeorgi@google.com --- M raiden_debug_spi.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/50/40650/1
diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c index 173e355..a0d6578 100644 --- a/raiden_debug_spi.c +++ b/raiden_debug_spi.c @@ -480,12 +480,14 @@ ret = LIBUSB(libusb_init(NULL)); if (ret != 0) { msg_perr("Raiden: libusb_init failed\n"); + free(serial); return ret; }
ret = usb_device_find(&match, ¤t); if (ret != 0) { msg_perr("Raiden: Failed to find devices\n"); + free(serial); return ret; }
@@ -546,6 +548,7 @@
if (!device || !found) { msg_perr("Raiden: No usable device found.\n"); + free(serial); return 1; }
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40650 )
Change subject: raiden_debug_spi: Fix memleak ......................................................................
Patch Set 1: Code-Review+1
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40650 )
Change subject: raiden_debug_spi: Fix memleak ......................................................................
Patch Set 1: Code-Review+2
Stefan Reinauer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40650 )
Change subject: raiden_debug_spi: Fix memleak ......................................................................
Patch Set 1: Code-Review+2
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40650 )
Change subject: raiden_debug_spi: Fix memleak ......................................................................
Patch Set 1: Code-Review+2
Thank you for the patches Patrick!
Angel Pons has submitted this change. ( https://review.coreboot.org/c/flashrom/+/40650 )
Change subject: raiden_debug_spi: Fix memleak ......................................................................
raiden_debug_spi: Fix memleak
Change-Id: I2701a8fbae63657edc9cc258666cc951f92b1115 Found-by: Coverity Scan #1420204 Signed-off-by: Patrick Georgi pgeorgi@google.com Reviewed-on: https://review.coreboot.org/c/flashrom/+/40650 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 raiden_debug_spi.c 1 file changed, 3 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/raiden_debug_spi.c b/raiden_debug_spi.c index 173e355..a0d6578 100644 --- a/raiden_debug_spi.c +++ b/raiden_debug_spi.c @@ -480,12 +480,14 @@ ret = LIBUSB(libusb_init(NULL)); if (ret != 0) { msg_perr("Raiden: libusb_init failed\n"); + free(serial); return ret; }
ret = usb_device_find(&match, ¤t); if (ret != 0) { msg_perr("Raiden: Failed to find devices\n"); + free(serial); return ret; }
@@ -546,6 +548,7 @@
if (!device || !found) { msg_perr("Raiden: No usable device found.\n"); + free(serial); return 1; }