sim: moxie: fix leakage in error path [BZ #18273]
Reported-by: dcb <dcb314@hotmail.com>
This commit is contained in:
parent
3f946aa825
commit
7d8a636c9a
@ -1,3 +1,8 @@
|
||||
2015-10-11 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
PR sim/18273
|
||||
* interp.c (load_dtb): Close open file in error path.
|
||||
|
||||
2015-06-23 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
@ -1273,6 +1273,7 @@ load_dtb (SIM_DESC sd, const char *filename)
|
||||
if (size != fread (buf, 1, size, f))
|
||||
{
|
||||
sim_io_eprintf (sd, "ERROR: error reading ``%s''.\n", filename);
|
||||
fclose (f);
|
||||
return;
|
||||
}
|
||||
sim_core_write_buffer (sd, scpu, write_map, buf, 0xE0000000, size);
|
||||
|
Loading…
Reference in New Issue
Block a user