aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-30 17:18:54 +0000
committerTom Tromey <tromey@redhat.com>2013-05-30 17:18:54 +0000
commitedefe1dab2efc4cd0c9f3ee448a1ff3745705554 (patch)
tree5680a8a55e411fa28a753db9376de646685a2985 /gdb/python
parent54f72dcc36781bdb55aa8347635577219c9230a0 (diff)
downloadgdb-edefe1dab2efc4cd0c9f3ee448a1ff3745705554.zip
gdb-edefe1dab2efc4cd0c9f3ee448a1ff3745705554.tar.gz
gdb-edefe1dab2efc4cd0c9f3ee448a1ff3745705554.tar.bz2
fix py-value.c
Some code in py-value.c could exit a loop without running some cleanups made in the loop. * python/py-value.c (valpy_binop): Call do_cleanups before exiting loop.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-value.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 0b2a38f..0d87219 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -769,11 +769,17 @@ valpy_binop (enum valpy_opcode opcode, PyObject *self, PyObject *other)
a gdb.Value object and need to convert it from python as well. */
arg1 = convert_value_from_python (self);
if (arg1 == NULL)
- break;
+ {
+ do_cleanups (cleanup);
+ break;
+ }
arg2 = convert_value_from_python (other);
if (arg2 == NULL)
- break;
+ {
+ do_cleanups (cleanup);
+ break;
+ }
switch (opcode)
{