From: Tom Tromey Date: Thu, 30 May 2013 17:20:02 +0000 (+0000) Subject: fix symtab.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1abaf0423f9c1391c193baa0f54445a1b5367ab6;p=binutils-gdb.git fix symtab.c search_symbols had some bad code resulting in a cleanup being both discarded and run. * symtab.c (search_symbols): Introduce a null cleanup for 'retval_chain'. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1f07f38cc5f..5331d5b16b3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-30 Tom Tromey + + * symtab.c (search_symbols): Introduce a null cleanup for + 'retval_chain'. + 2013-05-30 Tom Tromey * python/py-value.c (valpy_binop): Call do_cleanups before diff --git a/gdb/symtab.c b/gdb/symtab.c index def556b693f..9040035a928 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -3529,7 +3529,7 @@ search_symbols (char *regexp, enum search_domain kind, &datum); } - retval_chain = old_chain; + retval_chain = make_cleanup (null_cleanup, NULL); /* Here, we search through the minimal symbol tables for functions and variables that match, and force their symbols to be read.