aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-som.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-07-22 18:00:50 +0000
committerTom Tromey <tromey@redhat.com>2013-07-22 18:00:50 +0000
commit29b2cc46a5b148d39bd003a530c93aead7859bbc (patch)
treeb40c9c295b9e209b2f80f2b6d77564d262e29834 /gdb/solib-som.c
parentd11600184f9a77b4f781f3041ddb3c5c69bdf41e (diff)
downloadgdb-29b2cc46a5b148d39bd003a530c93aead7859bbc.zip
gdb-29b2cc46a5b148d39bd003a530c93aead7859bbc.tar.gz
gdb-29b2cc46a5b148d39bd003a530c93aead7859bbc.tar.bz2
fix solib-som.c
som_open_symbol_file_object was leaking a cleanup. * solib-som.c (som_open_symbol_file_object): Call do_cleanups.
Diffstat (limited to 'gdb/solib-som.c')
-rw-r--r--gdb/solib-som.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/solib-som.c b/gdb/solib-som.c
index f88b539..457e464 100644
--- a/gdb/solib-som.c
+++ b/gdb/solib-som.c
@@ -698,6 +698,7 @@ som_open_symbol_file_object (void *from_ttyp)
int errcode;
int from_tty = *(int *)from_ttyp;
gdb_byte buf[4];
+ struct cleanup *cleanup;
if (symfile_objfile)
if (!query (_("Attempt to reload symbols from process? ")))
@@ -727,10 +728,11 @@ som_open_symbol_file_object (void *from_ttyp)
return 0;
}
- make_cleanup (xfree, filename);
+ cleanup = make_cleanup (xfree, filename);
/* Have a pathname: read the symbol file. */
symbol_file_add_main (filename, from_tty);
+ do_cleanups (cleanup);
return 1;
}