summaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2011-01-19 18:19:54 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2011-01-19 18:19:54 +0000
commitc92fba05aabf29bffff803dfb2e9371baedd04f1 (patch)
tree0950d6bc7a1630782df8fa676193bb88044370db /binutils/readelf.c
parentcfabe4d400a57fd6f8b6224578b6e7000362dbfd (diff)
downloadbinutils-redhat-c92fba05aabf29bffff803dfb2e9371baedd04f1.tar.gz
* readelf.c (process_object): Free dynamic_section after use.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index abc251a500..af1a00208f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12405,6 +12405,12 @@ process_object (char * file_name, FILE * file)
dynamic_syminfo = NULL;
}
+ if (dynamic_section)
+ {
+ free (dynamic_section);
+ dynamic_section = NULL;
+ }
+
if (section_headers_groups)
{
free (section_headers_groups);