aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-11 22:01:30 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-11 22:01:30 +0000
commitf3be5b643183867a024c5917a9c96a30f4a179b6 (patch)
treee7f7297a58d9e97d33fb04066217189ebd62d197 /gdb/python
parented16fd1b1cafa7dcaf68ee6b1759bab1a25c270e (diff)
downloadgdb-f3be5b643183867a024c5917a9c96a30f4a179b6.zip
gdb-f3be5b643183867a024c5917a9c96a30f4a179b6.tar.gz
gdb-f3be5b643183867a024c5917a9c96a30f4a179b6.tar.bz2
2011-03-11 Michael Snyder <msnyder@vmware.com>
* python/py-breakpoint.c (bppy_set_condition): Stop memory leak.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-breakpoint.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index c8308b9..bfebb1a 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -457,6 +457,10 @@ bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure)
{
set_breakpoint_condition (self_bp->bp, exp, 0);
}
+
+ if (newvalue != Py_None)
+ xfree (exp);
+
GDB_PY_SET_HANDLE_EXCEPTION (except);
return 0;