This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] tree-data-ref.c: Fix memory leak.
- From: Jeffrey A Law <law at redhat dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 Dec 2004 10:35:48 -0700
- Subject: Re: [patch] tree-data-ref.c: Fix memory leak.
- Organization: Red Hat, Inc
- References: <20041210.121449.75758452.kazu@cs.umass.edu>
- Reply-to: law at redhat dot com
On Fri, 2004-12-10 at 12:14 -0500, Kazu Hirata wrote:
> Hi,
>
> Attached is a patch to fix memory leak.
>
> In free_data_refs, we free the VARRAY in each data_reference object,
> but we somehow don't free the data_reference object itself.
>
> Tested on i686-pc-linux-gnu. OK to apply?
>
> Kazu Hirata
>
> 2004-12-10 Kazu Hirata <kazu@cs.umass.edu>
>
> * tree-data-ref.c (free_data_refs): Free each data_reference
> object.
I'm going to assume that you looked at the various routines which use
free_data_refs to verify that they did not hang on to any of the
struct data_reference * objects.
Approved.
Jeff