Patchwork [Fortran,committed] Fix memleak in generate_component_assignments

login
register
mail settings
Submitter Tobias Burnus
Date Dec. 5, 2012, 3:45 p.m.
Message ID <50BF6C2C.7090509@net-b.de>
Download mbox | patch
Permalink /patch/203894/
State New
Headers show

Comments

Tobias Burnus - Dec. 5, 2012, 3:45 p.m.
Found by Coverity's scanner.

Committed as Rev. 194225  after building with the patch.

Tobias

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(Revision 194224)
+++ ChangeLog	(Arbeitskopie)
@@ -1,3 +1,7 @@ 
+2012-12-05  Tobias Burnus  <burnus@net-b.de>
+
+	* resolve.c (generate_component_assignments): Fix memleak.
+
 2012-12-03  Janus Weil  <janus@gcc.gnu.org>
 
 	PR fortran/55548
Index: resolve.c
===================================================================
--- resolve.c	(Revision 194224)
+++ resolve.c	(Arbeitskopie)
@@ -9857,7 +9857,6 @@  generate_component_assignments (gfc_code **code, g
 	continue;
 
       /* Make an assigment for this component.  */
-      this_code = gfc_get_code ();
       this_code = build_assignment (EXEC_ASSIGN,
 				    (*code)->expr1, (*code)->expr2,
 				    comp1, comp2, (*code)->loc);