This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch #PR 25933] memory leaks


Uttam Pawar <uttamp@us.ibm.com> writes:

> @@ -1,3 +1,10 @@
> +2006-01-23  Uttam Pawar  <uttamp@us.ibm.com>
> +
> +   PR #25933
> +   * loop-unroll.c (unroll_loop_runtime_iterations): Fix for
> +   a memory leak.
> +   * tree-ssa-live.c (type_var_init): Fix for a memory leak.
> +

In the ChangeLog entry, write the PR number as
	PR middle-end/25933
And make sure to use tabs at the start of the ChangeLog lines.  Follow
the format of the existing entries.

(In the future, please send the ChangeLog entry as part of the text,
rather than as a diff.  Thanks.)

> +  if (dom_bbs)
> +    free(dom_bbs);

Please add a space between the 'e' and the '('.

> diff -urpN trunk.orig/gcc/tree-ssa-live.c trunk/gcc/tree-ssa-live.c
> --- trunk.orig/gcc/tree-ssa-live.c  2006-01-18 10:03:20.000000000 -0800
> +++ trunk/gcc/tree-ssa-live.c   2006-01-20 16:15:57.000000000 -0800
> @@ -1083,7 +1083,10 @@ type_var_init (var_map map)
> 
>    tv = tpa_init (map);
>    if (!tv)
> -    return NULL;
> +    {
> +      sbitmap_free(seen);
> +      return NULL;
> +    }

Please instead test moving the initialization of seen after the call
to tpa_init.

Patch is OK with those changes if it passes bootstrap and regression
tests.

Thanks.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]