2011-03-14 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Mon, 14 Mar 2011 20:51:59 +0000 (20:51 +0000)
committerMichael Snyder <msnyder@vmware.com>
Mon, 14 Mar 2011 20:51:59 +0000 (20:51 +0000)
* objcopy.c (set_pe_subsystem): Free subsystem.

binutils/ChangeLog
binutils/objcopy.c

index 517202620819eb0a578a6c1133382a11cd088f24..894df92fd1c40a7610bf47261f24a8e53aafb062 100644 (file)
@@ -1,5 +1,7 @@
 2011-03-14  Michael Snyder  <msnyder@vmware.com>
 
+       * objcopy.c (set_pe_subsystem): Free subsystem.
+
        * wrstabs.c (stab_start_struct_type): Close memory leak.
 
        * readelf.c (process_version_sections): Free symbols.
index 51ea732fc6c262a1099f957ff95ea357133c14e7..77eaa348b18c151ba59384b8ecd92efaa44162e3 100644 (file)
@@ -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.  */