[COMMITTED] Fortran -- fix memory leak in array transformations.

Submitted by Steve Kargl on Oct. 23, 2011, 10:31 p.m.

Details

Message ID 20111023223131.GA7661@troutmask.apl.washington.edu
State New
Headers show

Commit Message

Steve Kargl Oct. 23, 2011, 10:31 p.m.
2011-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>

    * simplify.c (simplify_transformation_to_array): Fix memory leak.

Patch hide | download patch | download mbox

Index: simplify.c
===================================================================
--- simplify.c	(revision 180352)
+++ simplify.c	(working copy)
@@ -516,6 +516,7 @@  simplify_transformation_to_array (gfc_ex
      linked-list traversal. Masked elements are set to NULL.  */
   gfc_array_size (array, &size);
   arraysize = mpz_get_ui (size);
+  mpz_clear (size);
 
   arrayvec = XCNEWVEC (gfc_expr*, arraysize);