commit f0a34d7c6b6a74848581f920ad45cade96cf346e
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Apr 21 14:53:43 2011 +0000

    	* gengtype-state.c (read_a_state_token): Fix argument to
    	obstack_free.
    	* gengtype.c (matching_file_name_substitute): Likewise.
    
    
    
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172832 138bc75d-0d04-0410-961f-82ee72b054a4

diff --git a/gcc/gengtype-state.c b/gcc/gengtype-state.c
index fbfb35a..e9aa5d2 100644
--- a/src/gcc/gengtype-state.c
+++ b/src/gcc/gengtype-state.c
@@ -303,7 +303,7 @@ read_a_state_token (void)
       obstack_1grow (&id_obstack, (char) 0);
       ids = XOBFINISH (&id_obstack, char *);
       sid = state_ident_by_name (ids, INSERT);
-      obstack_free (&id_obstack, ids);
+      obstack_free (&id_obstack, NULL);
       ids = NULL;
       tk = XCNEW (struct state_token_st);
       tk->stok_kind = STOK_NAME;
@@ -408,7 +408,7 @@ read_a_state_token (void)
       tk->stok_file = state_path;
       tk->stok_next = NULL;
       strcpy (tk->stok_un.stok_string, cstr);
-      obstack_free (&bstring_obstack, cstr);
+      obstack_free (&bstring_obstack, NULL);
 
       return tk;
     }
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index cb0c77b..5dd877e 100644
--- a/src/gcc/gengtype.c
+++ b/src/gcc/gengtype.c
@@ -1943,7 +1943,7 @@ matching_file_name_substitute (const char *filnam, regmatch_t pmatch[10],
   obstack_1grow (&str_obstack, '\0');
   rawstr = XOBFINISH (&str_obstack, char *);
   str = xstrdup (rawstr);
-  obstack_free (&str_obstack, rawstr);
+  obstack_free (&str_obstack, NULL);
   DBGPRINTF ("matched replacement %s", str);
   rawstr = NULL;
   return str;
