1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 07:02:34 +02:00

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>
This commit is contained in:
Jacob Garber 2019-08-12 12:07:03 -06:00 committed by Nico Huber
parent 1c091d1aeb
commit ba7199958c

View File

@ -404,5 +404,6 @@ int linux_mtd_init(void)
ret = 0;
linux_mtd_init_exit:
free(param);
return ret;
}