diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-11 22:01:30 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-11 22:01:30 +0000 |
commit | f3be5b643183867a024c5917a9c96a30f4a179b6 (patch) | |
tree | e7f7297a58d9e97d33fb04066217189ebd62d197 /gdb | |
parent | ed16fd1b1cafa7dcaf68ee6b1759bab1a25c270e (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/python/py-breakpoint.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 13f9b16..898ff01 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2011-03-11 Michael Snyder <msnyder@vmware.com> + * python/py-breakpoint.c (bppy_set_condition): Stop memory leak. + * python/py-breakpoint.c (bppy_get_commands): Fix memory leak. * top.c (set_verbose): Assert showcmd was found. 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; |