Commit 2363489c by Ulrich Drepper

(mop_up): Set work->previous_argument to NULL after freeing it.

From-SVN: r24663
parent ad236eab
/* Demangler for GNU C++ /* Demangler for GNU C++
Copyright 1989, 91, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. Copyright 1989, 91, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.uucp) Written by James Clark (jjc@jclark.uucp)
Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
Modified by Satish Pai (pai@apollo.hp.com) for HP demangling Modified by Satish Pai (pai@apollo.hp.com) for HP demangling
...@@ -875,6 +875,7 @@ mop_up (work, declp, success) ...@@ -875,6 +875,7 @@ mop_up (work, declp, success)
{ {
string_delete (work->previous_argument); string_delete (work->previous_argument);
free ((char*) work->previous_argument); free ((char*) work->previous_argument);
work->previous_argument = NULL;
} }
/* If demangling was successful, ensure that the demangled string is null /* If demangling was successful, ensure that the demangled string is null
...@@ -4416,4 +4417,3 @@ xrealloc (ptr, size) ...@@ -4416,4 +4417,3 @@ xrealloc (ptr, size)
return value; return value;
} }
#endif /* main */ #endif /* main */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment