Re: [PATCH] c-exp.y, memory leak

msnyder
2007-08-10T22:29:49Z

>> Date: Sat, 4 Aug 2007 18:51:09 -0700 (PDT)
>> From: msnyder@sonic.net
>>
>> 2007-08-04 Michael Snyder <msnyder@access-company.com>
>>
>> * c-exp.y (parse_number): Memory leak.
>
> Shouldn't this use xfree()?

Actually, although arguably they should -- I'm not so sure.

It's kind of a mess -- c-exp.y uses malloc, and then Makefile.in
runs sed on c-exp.c to transform malloc to xmalloc. No such sed
transform is done to convert free to xfree, and there is at least
one other call to free in there that does not get converted.

I'm reluctant to mess with the sed scripts. "free" is just too
common a string.