diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c625a006ff..d10df1c3b5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2011-06-30 Tom Tromey + + * 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 * symfile-mem.c (symbol_file_add_from_memory): Call do_cleanups. diff --git a/gdb/solib.c b/gdb/solib.c index a9f46e0009..94f8f13422 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 803b73cdca..ae1121201c 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 07dbc27671..4f8ded71dc 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; }