2011-10-20 Phil Muldoon <pmuldoon@redhat.com>
PR python/13308 PR python/13309 * python/py-breakpoint.c (gdbpy_breakpoints): Fix List reference leak. * python/py-inferior.c (gdbpy_inferiors): Fix List reference leak. Delete unused variables.
This commit is contained in:
parent
4a89cbfcf5
commit
27ca1a5b08
3 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2011-10-20 Phil Muldoon <pmuldoon@redhat.com>
|
||||||
|
|
||||||
|
PR python/13308
|
||||||
|
PR python/13309
|
||||||
|
|
||||||
|
* python/py-breakpoint.c (gdbpy_breakpoints): Fix List reference
|
||||||
|
leak.
|
||||||
|
* python/py-inferior.c (gdbpy_inferiors): Fix List reference
|
||||||
|
leak. Delete unused variables.
|
||||||
|
|
||||||
2011-10-20 Phil Muldoon <pmuldoon@redhat.com>
|
2011-10-20 Phil Muldoon <pmuldoon@redhat.com>
|
||||||
|
|
||||||
PR python/12656
|
PR python/12656
|
||||||
|
|
|
@ -697,7 +697,7 @@ build_bp_list (struct breakpoint *b, void *arg)
|
||||||
PyObject *
|
PyObject *
|
||||||
gdbpy_breakpoints (PyObject *self, PyObject *args)
|
gdbpy_breakpoints (PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
PyObject *list;
|
PyObject *list, *tuple;
|
||||||
|
|
||||||
if (bppy_live == 0)
|
if (bppy_live == 0)
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
|
@ -715,7 +715,10 @@ gdbpy_breakpoints (PyObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PyList_AsTuple (list);
|
tuple = PyList_AsTuple (list);
|
||||||
|
Py_DECREF (list);
|
||||||
|
|
||||||
|
return tuple;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the "stop" method (if implemented) in the breakpoint
|
/* Call the "stop" method (if implemented) in the breakpoint
|
||||||
|
|
|
@ -377,9 +377,7 @@ build_inferior_list (struct inferior *inf, void *arg)
|
||||||
PyObject *
|
PyObject *
|
||||||
gdbpy_inferiors (PyObject *unused, PyObject *unused2)
|
gdbpy_inferiors (PyObject *unused, PyObject *unused2)
|
||||||
{
|
{
|
||||||
int i = 0;
|
PyObject *list, *tuple;
|
||||||
PyObject *list, *inferior;
|
|
||||||
struct inferior *inf;
|
|
||||||
|
|
||||||
list = PyList_New (0);
|
list = PyList_New (0);
|
||||||
if (!list)
|
if (!list)
|
||||||
|
@ -391,7 +389,10 @@ gdbpy_inferiors (PyObject *unused, PyObject *unused2)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PyList_AsTuple (list);
|
tuple = PyList_AsTuple (list);
|
||||||
|
Py_DECREF (list);
|
||||||
|
|
||||||
|
return tuple;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Membuf and memory manipulation. */
|
/* Membuf and memory manipulation. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue