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:
87d2065
)
Memory leak in bfd_init_section_compress_status
author
Alan Modra
<amodra@gmail.com>
Wed, 8 Feb 2023 13:19:46 +0000
(23:49 +1030)
committer
Alan Modra
<amodra@gmail.com>
Wed, 8 Feb 2023 23:10:51 +0000
(09:40 +1030)
* compress.c (bfd_init_section_compress_status): Free
uncompressed_buffer on error return.
bfd/compress.c
patch
|
blob
|
history
diff --git
a/bfd/compress.c
b/bfd/compress.c
index 2cf8a6c28c9e76772a1841f383f3f87a55db2ebc..2a402c3f65c40ac9be5dd5b6b64442a5dc2eebb5 100644
(file)
--- a/
bfd/compress.c
+++ b/
bfd/compress.c
@@
-1083,7
+1083,10
@@
bfd_init_section_compress_status (bfd *abfd, sec_ptr sec)
if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer,
0, uncompressed_size))
- return false;
+ {
+ free (uncompressed_buffer);
+ return false;
+ }
sec->contents = uncompressed_buffer;
if (bfd_compress_section_contents (abfd, sec) == 0)