PR jit/63854: Fix memory leak of reginfo.c: valid_mode_changes_obstack
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 19 Nov 2014 19:11:37 +0000 (19:11 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 19 Nov 2014 19:11:37 +0000 (19:11 +0000)
gcc/ChangeLog:
PR jit/63854
* reginfo.c (finish_subregs_of_mode): Replace obstack_finish with
obstack_free when cleaning up valid_mode_changes_obstack.

From-SVN: r217792

gcc/ChangeLog
gcc/reginfo.c

index 90e86f6de00cb7f85af5027aedb56533f2b9c615..e280fc2b97de35cd26a46926c9e92feaeed45190 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-19  David Malcolm  <dmalcolm@redhat.com>
+
+       PR jit/63854
+       * reginfo.c (finish_subregs_of_mode): Replace obstack_finish with
+       obstack_free when cleaning up valid_mode_changes_obstack.
+
 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
 
        PR jit/63854
index efe23cdc41f918a2bd5832e6a117ac0c1e19e0a7..c2daf2216fa8e050ea404eee0ed9894cc63110f8 100644 (file)
@@ -1343,7 +1343,7 @@ void
 finish_subregs_of_mode (void)
 {
   XDELETEVEC (valid_mode_changes);
-  obstack_finish (&valid_mode_changes_obstack);
+  obstack_free (&valid_mode_changes_obstack, NULL);
 }
 
 /* Free all data attached to the structure.  This isn't a destructor because