This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 22/40] 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'.
---
 gdb/symtab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/symtab.c b/gdb/symtab.c
index def556b..9040035 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.
-- 
1.8.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]