* py-evtregistry.c (create_event_object): Decref
eventregistry_object if PyList_New fails.
This commit is contained in:
parent
3919fd966c
commit
f04010ffab
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* py-evtregistry.c (create_event_object): Decref
|
||||||
|
eventregistry_object if PyList_New fails.
|
||||||
|
|
||||||
2013-05-20 Tom Tromey <tromey@redhat.com>
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* py-cmd.c (gdbpy_string_to_argv): Check result of
|
* py-cmd.c (gdbpy_string_to_argv): Check result of
|
||||||
|
|
|
@ -89,7 +89,10 @@ create_eventregistry_object (void)
|
||||||
|
|
||||||
eventregistry_obj->callbacks = PyList_New (0);
|
eventregistry_obj->callbacks = PyList_New (0);
|
||||||
if (!eventregistry_obj->callbacks)
|
if (!eventregistry_obj->callbacks)
|
||||||
return NULL;
|
{
|
||||||
|
Py_DECREF (eventregistry_obj);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return eventregistry_obj;
|
return eventregistry_obj;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue