* py-evtregistry.c (create_event_object): Decref
eventregistry_object if PyList_New fails.
This commit is contained in:
parent
3919fd966c
commit
f04010ffab
@ -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>
|
||||
|
||||
* py-cmd.c (gdbpy_string_to_argv): Check result of
|
||||
|
@ -89,7 +89,10 @@ create_eventregistry_object (void)
|
||||
|
||||
eventregistry_obj->callbacks = PyList_New (0);
|
||||
if (!eventregistry_obj->callbacks)
|
||||
return NULL;
|
||||
{
|
||||
Py_DECREF (eventregistry_obj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return eventregistry_obj;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user