This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 16/40] fix varobj.c
- From: Tom Tromey <tromey at redhat dot com>
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 09 May 2013 12:51:32 -0600
- Subject: [PATCH 16/40] fix varobj.c
- References: <cover dot 1368124285 dot git dot tromey at redhat dot com>
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/varobj.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 467e59a..cf1a11f 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -3456,13 +3456,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 *
--
1.8.1.4