mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-28 20:43:45 +08:00
* objdump.c (slurp_file): Close file if fstat fails.
This commit is contained in:
parent
fbe2ec189e
commit
6c7130122d
@ -1,3 +1,7 @@
|
||||
2012-02-20 Namhyung Kim <namhyung.kim@lge.com>
|
||||
|
||||
* objdump.c (slurp_file): Close file if fstat fails.
|
||||
|
||||
2012-02-14 Cary Coutant <ccoutant@google.com>
|
||||
|
||||
* dwarf.c (dwarf_vmatoa64): New function.
|
||||
|
@ -1123,7 +1123,10 @@ slurp_file (const char *fn, size_t *size)
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
if (fstat (fd, &st) < 0)
|
||||
{
|
||||
close (fd);
|
||||
return NULL;
|
||||
}
|
||||
*size = st.st_size;
|
||||
#ifdef HAVE_MMAP
|
||||
msize = (*size + ps - 1) & ~(ps - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user