projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a89db5
)
coff object_p memory leaks
author
Alan Modra
<amodra@gmail.com>
Mon, 30 Dec 2019 10:47:08 +0000
(21:17 +1030)
committer
Alan Modra
<amodra@gmail.com>
Mon, 30 Dec 2019 13:20:35 +0000
(23:50 +1030)
* coffgen.c (coff_real_object_p): Free malloc'd memory on failure.
bfd/ChangeLog
patch
|
blob
|
history
bfd/coffgen.c
patch
|
blob
|
history
diff --git
a/bfd/ChangeLog
b/bfd/ChangeLog
index 186346e9c159c5e165ab1871d71f43a3ba35fbc3..809f1ba56d47b7d367db7b1c1a4c66940466dcf5 100644
(file)
--- a/
bfd/ChangeLog
+++ b/
bfd/ChangeLog
@@
-1,3
+1,7
@@
+2019-12-30 Alan Modra <amodra@gmail.com>
+
+ * coffgen.c (coff_real_object_p): Free malloc'd memory on failure.
+
2019-12-30 Alan Modra <amodra@gmail.com>
* archive.c (do_slurp_bsd_armap): Use bfd_alloc rather than
diff --git
a/bfd/coffgen.c
b/bfd/coffgen.c
index 57a18b02dc1dd10910a6a36db1d4a8ee63af0f8a..34d8d50506a51a7b6bd66b78ccc9bf144ecb9bfb 100644
(file)
--- a/
bfd/coffgen.c
+++ b/
bfd/coffgen.c
@@
-305,6
+305,9
@@
coff_real_object_p (bfd *abfd,
return abfd->xvec;
fail:
+ obj_coff_keep_syms (abfd) = FALSE;
+ obj_coff_keep_strings (abfd) = FALSE;
+ _bfd_coff_free_symbols (abfd);
bfd_release (abfd, tdata);
fail2:
abfd->tdata.any = tdata_save;