diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2021-04-21 07:55:21 +1000 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-04-22 11:42:33 +0000 |
commit | 991009505dad48cb9e655d4ad7937db776fdcb4f (patch) | |
tree | 3db9b1d36cb74087d71b2ea8ba51bea0c91f727a | |
parent | 02be851a63ee23fd0f9e8103504a61d26a48afc5 (diff) | |
download | flashrom-991009505dad48cb9e655d4ad7937db776fdcb4f.tar.gz flashrom-991009505dad48cb9e655d4ad7937db776fdcb4f.tar.bz2 flashrom-991009505dad48cb9e655d4ad7937db776fdcb4f.zip |
dummyflasher.c: Fix memory leak on shutdown
emu_data *data is allocated in init function and needs
to be freed in shutdown function.
BUG=b:181803212
TEST=builds and ninja test
Change-Id: I36f76d84d3547d081c64857e06da23ee63cc5594
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52557
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
-rw-r--r-- | dummyflasher.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/dummyflasher.c b/dummyflasher.c index 5190282c..ec5060d1 100644 --- a/dummyflasher.c +++ b/dummyflasher.c @@ -650,6 +650,7 @@ static int dummy_shutdown(void *data) free(flashchip_contents); } #endif + free(data); return 0; } |