This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] objcopy.c (copy_main): Close memory leak.


Michael Snyder <msnyder@vmware.com> writes:
> OK?
>
> 2011-03-08  Michael Snyder  <msnyder@vmware.com>
>
> 	* objcopy.c (copy_main): Close memory leak.
>
> Index: objcopy.c
> ===================================================================
> RCS file: /cvs/src/src/binutils/objcopy.c,v
> retrieving revision 1.149
> diff -u -p -r1.149 objcopy.c
> --- objcopy.c	28 Feb 2011 18:32:51 -0000	1.149
> +++ objcopy.c	8 Mar 2011 19:17:50 -0000
> @@ -3894,6 +3894,7 @@ copy_main (int argc, char *argv[])
>  
>        output_target = efi;
>        convert_efi_target (efi);
> +      free (efi);
>      }
>  
>    if (preserve_dates)

Not OK.  output_target (and thus efi) is still live after the if statement.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]