[PATCH] sim: Be sure of calling freeargv() after successfully call buildargv().
Michael Eager
eager@eagerm.com
Wed Jan 28 15:53:00 GMT 2015
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.
>
> 2015-01-28 Chen Gang <gang.chen.5i5j@gmail.com>
>
> * common/sim-options.c (sim_args_command): Call freeargv() when
> failure occurs.
> * mcore/interp.c (sim_do_command): Call freeargv() before return.
> * microblaze/interp.c (sim_do_command): Call freeargv() before
> return.
OK for Microblaze.
There appear to be other places where buildargv() is not followed by
freeargv(). See sim/common/run.c. There may be others.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Binutils
mailing list