This is the mail archive of the
mailing list for the GCC project.
Re: [patch] c-common.c: Fix memory leak.
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 11 Dec 2004 15:42:46 +0000
- Subject: Re: [patch] c-common.c: Fix memory leak.
- Organization: Codesourcery LLC
- References: <email@example.com>
Kazu Hirata wrote:
Attached is a patch to fix memory leak.
Consider the "if" statement shown in the patch. If we are returning
cstr.txt, nobody will ever reference namep, which is allocated via
XVECNEW a few lines up.
The patch solves this problem by freeing namep with XDELETEVEC.
is it really the case that our new shiny C++-safe macros are so
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
firstname.lastname@example.org :: http://www.planetfall.pwp.blueyonder.co.uk