public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, Fortran, committed] Fix another two memory leaks
@ 2013-03-01 16:45 Tobias Burnus
  0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2013-03-01 16:45 UTC (permalink / raw)
  To: gcc patches, gfortran

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]

Committed after regtesting as Rev. 196387. (I forgot to mention that it 
fixes PR56491)
http://gcc.gnu.org/ml/gcc-cvs/2013-03/msg00024.html

Tobias

[-- Attachment #2: committed.diff --]
[-- Type: text/x-patch, Size: 1262 bytes --]

Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(Revision 196386)
+++ gcc/fortran/ChangeLog	(Arbeitskopie)
@@ -1,5 +1,10 @@
 2013-03-01  Tobias Burnus  <burnus@net-b.de>
 
+	* iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
+	* symbol.c (free_components): Free proc-pointer components.
+
+2013-03-01  Tobias Burnus  <burnus@net-b.de>
+
 	* trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
 	* trans-io.c (build_dt): Ditto.
 
Index: gcc/fortran/iresolve.c
===================================================================
--- gcc/fortran/iresolve.c	(Revision 196386)
+++ gcc/fortran/iresolve.c	(Arbeitskopie)
@@ -140,7 +140,7 @@ resolve_bound (gfc_expr *f, gfc_expr *array, gfc_e
 	}
     }
 
-  f->value.function.name = xstrdup (name);
+  f->value.function.name = gfc_get_string (name);
 }
 
 
Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c	(Revision 196386)
+++ gcc/fortran/symbol.c	(Arbeitskopie)
@@ -2076,6 +2076,7 @@ free_components (gfc_component *p)
 
       gfc_free_array_spec (p->as);
       gfc_free_expr (p->initializer);
+      free (p->tb);
 
       free (p);
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-01 16:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 16:45 [Patch, Fortran, committed] Fix another two memory leaks Tobias Burnus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).