fix linespec bug noticed by the checker
This fixes a linespec bug noticed by the cleanup checker. find_linespec_symbols did this: cleanup = demangle_for_lookup (name, state->language->la_language, &lookup_name); [...] cleanup = make_cleanup (xfree, canon); But this is wrong, as it makes a subsequent call to do_cleanups not clean up all the local state. * linespec.c (find_linespec_symbols): Don't reassign to 'cleanup'.
This commit is contained in:
parent
b81b921f79
commit
e61727abf0
2 changed files with 5 additions and 1 deletions
|
@ -3097,7 +3097,7 @@ find_linespec_symbols (struct linespec_state *state,
|
|||
if (canon != NULL)
|
||||
{
|
||||
lookup_name = canon;
|
||||
cleanup = make_cleanup (xfree, canon);
|
||||
make_cleanup (xfree, canon);
|
||||
}
|
||||
|
||||
/* It's important to not call expand_symtabs_matching unnecessarily
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue