* [RFA] objcopy.c (copy_main): Close memory leak.
@ 2011-03-08 19:19 Michael Snyder
2011-03-14 12:30 ` Richard Sandiford
0 siblings, 1 reply; 2+ messages in thread
From: Michael Snyder @ 2011-03-08 19:19 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 5 bytes --]
OK?
[-- Attachment #2: objcopy.txt --]
[-- Type: text/plain, Size: 538 bytes --]
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFA] objcopy.c (copy_main): Close memory leak.
2011-03-08 19:19 [RFA] objcopy.c (copy_main): Close memory leak Michael Snyder
@ 2011-03-14 12:30 ` Richard Sandiford
0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2011-03-14 12:30 UTC (permalink / raw)
To: Michael Snyder; +Cc: binutils
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-14 12:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-08 19:19 [RFA] objcopy.c (copy_main): Close memory leak Michael Snyder
2011-03-14 12:30 ` Richard Sandiford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).