diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:16:24 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:16:24 +0000 |
commit | f04010ffab35dc11d5b072f2f6bc5ba6022c3c2d (patch) | |
tree | 48aebc9065d6f2328d02b6b4f7f692535308b26a /gdb/python | |
parent | 3919fd966cd15e6ef79aa58e3e75ef12d764999f (diff) | |
download | gdb-f04010ffab35dc11d5b072f2f6bc5ba6022c3c2d.zip gdb-f04010ffab35dc11d5b072f2f6bc5ba6022c3c2d.tar.gz gdb-f04010ffab35dc11d5b072f2f6bc5ba6022c3c2d.tar.bz2 |
* py-evtregistry.c (create_event_object): Decref
eventregistry_object if PyList_New fails.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-evtregistry.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/python/py-evtregistry.c b/gdb/python/py-evtregistry.c index c8003af..05c8586 100644 --- a/gdb/python/py-evtregistry.c +++ b/gdb/python/py-evtregistry.c @@ -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; } |