diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-10-11 03:56:22 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-10-11 03:56:22 -0400 |
commit | 7d8a636c9a234354c9b2ecf01b6e405bece190a1 (patch) | |
tree | f2b8026a64b5bcbc15f567da26774a1d8ac3290e /sim/moxie/interp.c | |
parent | 3f946aa82518e878aea2cba4b6a9bcc651412c5c (diff) | |
download | gdb-7d8a636c9a234354c9b2ecf01b6e405bece190a1.zip gdb-7d8a636c9a234354c9b2ecf01b6e405bece190a1.tar.gz gdb-7d8a636c9a234354c9b2ecf01b6e405bece190a1.tar.bz2 |
sim: moxie: fix leakage in error path [BZ #18273]
Reported-by: dcb <dcb314@hotmail.com>
Diffstat (limited to 'sim/moxie/interp.c')
-rw-r--r-- | sim/moxie/interp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c index 35ee2a7..df92cee 100644 --- a/sim/moxie/interp.c +++ b/sim/moxie/interp.c @@ -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); |