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

Mike Frysinger
2015-02-17T10:36:50Z

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]