diff options
author | Jacob Garber <jgarber1@ualberta.ca> | 2019-08-12 12:07:03 -0600 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2019-09-24 19:07:02 +0000 |
commit | ba7199958c9eef803845dcd9f3930277bbf9eb76 (patch) | |
tree | 83b9c4c92e2d3c39e4e25d33a870a02f38ca3e1d /linux_mtd.c | |
parent | 1c091d1aebb055149c89f88fd5766ca4e33b7b3e (diff) | |
download | flashrom-git-ba7199958c9eef803845dcd9f3930277bbf9eb76.tar.gz |
linux_mtd: Fix param memory leak
extract_programmer_param() stores allocated memory in param, so make
sure it is freed at the end of the function.
Change-Id: I363e66b49c1ed4034ac058b94a938c8bb197e048
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 1403823
Reviewed-on: https://review.coreboot.org/c/flashrom/+/34847
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'linux_mtd.c')
-rw-r--r-- | linux_mtd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux_mtd.c b/linux_mtd.c index ae8bef2f..d2df95ef 100644 --- a/linux_mtd.c +++ b/linux_mtd.c @@ -404,5 +404,6 @@ int linux_mtd_init(void) ret = 0; linux_mtd_init_exit: + free(param); return ret; } |