This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch]: Fix memory leak of c-exp.y
On Wed, Jun 25, 2008 at 08:43:03AM -0400, Joel Brobecker wrote:
> Hi teawater,
>
> > 2008-06-21 Hui Zhu <teawater@gmail.com>
> > * gdb/c-exp.y: Fix memory leak of function parse_number
>
> Instead of adding calls to free, I looks like this string is actually
> completely local, so how about replacing the call to malloc with a
> call to alloca, and then get rid of all calls to free instead?
Let's go with Jan's version for now - he's fixed a few related
problems in the same function. Jan, that patch is OK.
--
Daniel Jacobowitz
CodeSourcery