From: Michael Snyder Date: Mon, 14 Mar 2011 20:51:59 +0000 (+0000) Subject: 2011-03-14 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0cbf3531351540a91e7dd2b5c00696618bc93ee2;p=binutils-gdb.git 2011-03-14 Michael Snyder * objcopy.c (set_pe_subsystem): Free subsystem. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 51720262081..894df92fd1c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Michael Snyder + * objcopy.c (set_pe_subsystem): Free subsystem. + * wrstabs.c (stab_start_struct_type): Close memory leak. * readelf.c (process_version_sections): Free symbols. diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 51ea732fc6c..77eaa348b18 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -3157,6 +3157,8 @@ set_pe_subsystem (const char *s) pe_section_alignment = PE_DEF_SECTION_ALIGNMENT; break; } + if (s != subsystem) + free ((char *) subsystem); } /* Convert EFI target to PEI target. */