aboutsummaryrefslogtreecommitdiffstats
path: root/dummyflasher.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-04-21 07:55:21 +1000
committerNico Huber <nico.h@gmx.de>2021-04-22 11:42:33 +0000
commit991009505dad48cb9e655d4ad7937db776fdcb4f (patch)
tree3db9b1d36cb74087d71b2ea8ba51bea0c91f727a /dummyflasher.c
parent02be851a63ee23fd0f9e8103504a61d26a48afc5 (diff)
downloadflashrom-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>
Diffstat (limited to 'dummyflasher.c')
-rw-r--r--dummyflasher.c1
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;
}