diff options
author | Christian Reis <kiko@src.gnome.org> | 2003-12-05 12:19:18 +0000 |
---|---|---|
committer | Christian Reis <kiko@src.gnome.org> | 2003-12-05 12:19:18 +0000 |
commit | b4580425b553a640cd5bf85f5a7ee97bb73e5b40 (patch) | |
tree | 40ff44a26c3fd1cc4078dcb374d3fb78462a1384 | |
parent | 4567fd2a9515c7a68246deb8c633e87b534b2b03 (diff) | |
download | pygtk-b4580425b553a640cd5bf85f5a7ee97bb73e5b40.tar.gz |
Avoid leakage in _wrap_gtk_radio_button_group by PyDECREFing as
necessary. Thanks to Johan for pointing this out.
-rw-r--r-- | gtkmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtkmodule.c b/gtkmodule.c index 6da85774..a00c0769 100644 --- a/gtkmodule.c +++ b/gtkmodule.c @@ -5228,7 +5228,12 @@ _wrap_gtk_radio_button_group(PyObject *self, PyObject *args) return NULL; for (tmp = buttons; tmp != NULL; tmp = tmp->next) { PyObject *button = PyGtk_New(tmp->data); + if (!button) { + Py_DECREF(button); + return NULL; + } PyList_Append(ret, button); + Py_DECREF(button); } return ret; } |