diff options
author | Patrick Georgi <pgeorgi@google.com> | 2020-04-23 09:26:12 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-05-05 13:07:00 +0000 |
commit | ba6003fbff506229fc21658c3204083ee28235d2 (patch) | |
tree | 1d34978eb44e20331fa19d44941f8d7977297af6 | |
parent | 8bbb764818f8ebf71bd14bd6ff90ad233646cc3b (diff) | |
download | flashrom-ba6003fbff506229fc21658c3204083ee28235d2.tar.gz flashrom-ba6003fbff506229fc21658c3204083ee28235d2.tar.bz2 flashrom-ba6003fbff506229fc21658c3204083ee28235d2.zip |
raiden_debug_spi: Fix memleak
Change-Id: Ib9d99fefda812d20265db47be353c844f8b77129
Found-by: Coverity Scan #1420204
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/40969
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r-- | raiden_debug_spi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c index 368476f6..2127f696 100644 --- a/raiden_debug_spi.c +++ b/raiden_debug_spi.c @@ -480,8 +480,10 @@ int raiden_debug_spi_init(void) int ret; int request_enable = get_target(); - if (request_enable < 0) + if (request_enable < 0) { + free(serial); return 1; + } usb_match_init(&match); |