[PATCH] sim: Be sure of calling freeargv() after successfully call buildargv().

Mike Frysinger vapier@gentoo.org
Tue Feb 17 10:36:00 GMT 2015


On 29 Jan 2015 06:19, Chen Gang S wrote:
> On 1/28/15 23:53, Michael Eager wrote:
> > On 01/28/15 03:45, Chen Gang S wrote:
> >> buildargv() and freeargv() are pairs, so need be sure of them always
> >> paired to avoid memory leak.
> > 
> > There appear to be other places where buildargv() is not followed by
> > freeargv().  See sim/common/run.c.  There may be others.
> 
> For me, I intended to skip buildargv() in "sim/common/run.c", because it
> may contents read only memory. It is in main(), also main() often uses
> exit(), so I skip it, it doesn't matter.

i'm not too worried about run.c.  in fact, the more it bitrots the better ... it 
gets people to switch to nrun.c :).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20150217/051f37a9/attachment.sig>


More information about the Gdb-patches mailing list