aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-06-30 19:29:55 +0000
committerTom Tromey <tromey@redhat.com>2011-06-30 19:29:55 +0000
commitf748fb408892764f17e4269508a2af6f613909fd (patch)
tree51de58f49904587d43a0be20f8c4688808d1db3b
parent3bb47e8bce4c147142b298c5c23368ba189105bc (diff)
downloadgdb-f748fb408892764f17e4269508a2af6f613909fd.zip
gdb-f748fb408892764f17e4269508a2af6f613909fd.tar.gz
gdb-f748fb408892764f17e4269508a2af6f613909fd.tar.bz2
* varobj.c (varobj_create): Call do_cleanups on early exit path.
* valops.c (find_overload_match): Call do_cleanups on early exit path. * solib.c (solib_find): Call do_cleanups on early exit path.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/solib.c1
-rw-r--r--gdb/valops.c1
-rw-r--r--gdb/varobj.c1
4 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c625a00..d10df1c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2011-06-30 Tom Tromey <tromey@redhat.com>
+ * varobj.c (varobj_create): Call do_cleanups on early exit path.
+ * valops.c (find_overload_match): Call do_cleanups on early exit
+ path.
+ * solib.c (solib_find): Call do_cleanups on early exit path.
+
+2011-06-30 Tom Tromey <tromey@redhat.com>
+
* symfile-mem.c (symbol_file_add_from_memory): Call do_cleanups.
* solib-svr4.c (open_symbol_file_object): Call do_cleanups on all
return paths. Defer final do_cleanups until last return.
diff --git a/gdb/solib.c b/gdb/solib.c
index a9f46e0..94f8f13 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -254,6 +254,7 @@ solib_find (char *in_pathname, int *fd)
if (remote_filename_p (temp_pathname))
{
*fd = -1;
+ do_cleanups (old_chain);
return temp_pathname;
}
diff --git a/gdb/valops.c b/gdb/valops.c
index 803b73c..ae11212 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -2585,6 +2585,7 @@ find_overload_match (struct type **arg_types, int nargs,
if (*valp)
{
*staticp = 1;
+ do_cleanups (all_cleanups);
return 0;
}
}
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 07dbc27..4f8ded7 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -580,6 +580,7 @@ varobj_create (char *objname,
return a sensible error. */
if (!gdb_parse_exp_1 (&p, block, 0, &var->root->exp))
{
+ do_cleanups (old_chain);
return NULL;
}