* varobj.c (varobj_create): Call do_cleanups on early exit path.
authorTom Tromey <tromey@redhat.com>
Thu, 30 Jun 2011 19:29:55 +0000 (19:29 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 30 Jun 2011 19:29:55 +0000 (19:29 +0000)
* valops.c (find_overload_match): Call do_cleanups on early exit
path.
* solib.c (solib_find): Call do_cleanups on early exit path.

gdb/ChangeLog
gdb/solib.c
gdb/valops.c
gdb/varobj.c

index c625a006ff8571666131ae7864eb38292357a314..d10df1c3b5befc45877976a6afa0fd9b0b345abe 100644 (file)
@@ -1,3 +1,10 @@
+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.
index a9f46e00099a931aceb4923373d25e5c11be23bd..94f8f13422e22b14f30c9677879cddf45ff0b584 100644 (file)
@@ -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;
     }
 
index 803b73cdca056bfb5adde1a4d8e012c5c72c9ae9..ae1121201cfd9b1dd64a736dcb773b16d484341b 100644 (file)
@@ -2585,6 +2585,7 @@ find_overload_match (struct type **arg_types, int nargs,
          if (*valp)
            {
              *staticp = 1;
+             do_cleanups (all_cleanups);
              return 0;
            }
        }
index 07dbc27671750cca4b59886dce69850949f64c1f..4f8ded71dc6c5ad60670ad282ceb3006b9eb0d05 100644 (file)
@@ -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;
        }