From 2842702f2f35e24240a80e6683bdff1c44a0e741 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 30 Mar 2011 15:37:48 +0000 Subject: [PATCH] * readelf.c (process_gnu_liblist): Stop memory leak. --- binutils/ChangeLog | 4 ++++ binutils/readelf.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index e6a682ee8b2..f9d84577507 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2011-03-30 Michael Snyder + + * readelf.c (process_gnu_liblist): Stop memory leak. + 2011-03-29 Alan Modra * coffdump.c: Include bfd_stdint.h diff --git a/binutils/readelf.c b/binutils/readelf.c index 6a4a6e8d231..9b4f237f9f4 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -11846,6 +11846,7 @@ process_gnu_liblist (FILE * file) || section->sh_entsize != sizeof (Elf32_External_Lib)) { free (elib); + free (strtab); break; } @@ -11887,6 +11888,7 @@ process_gnu_liblist (FILE * file) } free (elib); + free (strtab); } } -- 2.30.2