mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 14:42:36 +02:00
Fix a memleak in the dummyflasher
Emu_persistent_image was not freed correctly. This bug was found thanks to valgrind. Corresponding to flashrom svn r1603. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
parent
5609f9d408
commit
e0ff1652a6
@ -150,8 +150,9 @@ static int dummy_shutdown(void *data)
|
||||
if (emu_chip != EMULATE_NONE) {
|
||||
if (emu_persistent_image) {
|
||||
msg_pdbg("Writing %s\n", emu_persistent_image);
|
||||
write_buf_to_file(flashchip_contents, emu_chip_size,
|
||||
emu_persistent_image);
|
||||
write_buf_to_file(flashchip_contents, emu_chip_size, emu_persistent_image);
|
||||
free(emu_persistent_image);
|
||||
emu_persistent_image = NULL;
|
||||
}
|
||||
free(flashchip_contents);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user