fix varobj.c
authorTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 17:11:38 +0000 (17:11 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 17:11:38 +0000 (17:11 +0000)
c_value_of_root is missing a call to do_cleanups at one return.
This fixes the problem by removing that return and letting control
fall through.

* varobj.c (c_value_of_root): Call do_cleanups along all
return paths.

gdb/ChangeLog
gdb/varobj.c

index e3445721f10e362ba28f89090b3b93e88659d465..b8e5f991527408d3f071e9d36e46002f7f1cd2d0 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-30  Tom Tromey  <tromey@redhat.com>
+
+       * varobj.c (c_value_of_root): Call do_cleanups along all
+       return paths.
+
 2013-05-30  Tom Tromey  <tromey@redhat.com>
 
        * tracepoint.c (trace_dump_command): Unconditionally call
index 70ed28fc03d1cb7780a8c4f99d0383a876a65260..d4fa6ba0cc03d08d0f343295c90d55e54cd2d0c1 100644 (file)
@@ -3474,13 +3474,11 @@ c_value_of_root (struct varobj **var_handle)
        {
          new_val = evaluate_expression (var->root->exp);
        }
-
-      return new_val;
     }
 
   do_cleanups (back_to);
 
-  return NULL;
+  return new_val;
 }
 
 static struct value *
This page took 0.030205 seconds and 4 git commands to generate.