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 | |
parent | 3919fd966cd15e6ef79aa58e3e75ef12d764999f (diff) | |
download | binutils-f04010ffab35dc11d5b072f2f6bc5ba6022c3c2d.zip binutils-f04010ffab35dc11d5b072f2f6bc5ba6022c3c2d.tar.gz binutils-f04010ffab35dc11d5b072f2f6bc5ba6022c3c2d.tar.bz2 |
* py-evtregistry.c (create_event_object): Decref
eventregistry_object if PyList_New fails.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/python/py-evtregistry.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a9f4354..8b417da 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 PyList_New. 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; } |