* 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
|
@ -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…
Add table
Add a link
Reference in a new issue