fix linespec bug noticed by the checker
authorTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 16:57:38 +0000 (16:57 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 16:57:38 +0000 (16:57 +0000)
commite61727abf0dca6c26548e1df9d51a370faf28542
tree42c3da034fe85731e9eb27674de591e760ad272a
parentb81b921f794dc3ce6112e784f39511004c7cb542
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'.
gdb/ChangeLog
gdb/linespec.c