[gnome-python] Fix reference leak.
- From: Gustavo J. A. M. Carneiro <gjc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-python] Fix reference leak.
- Date: Sat, 28 Nov 2009 18:36:20 +0000 (UTC)
commit e050a3459ecd9aeb856259d8b2aa762b7b9bfa17
Author: Gustavo Carneiro <gjc inescporto pt>
Date: Sat Nov 28 18:35:29 2009 +0000
Fix reference leak.
gconf/gconf.override | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gconf/gconf.override b/gconf/gconf.override
index 738d0fd..3cb8731 100644
--- a/gconf/gconf.override
+++ b/gconf/gconf.override
@@ -533,8 +533,9 @@ _wrap_gconf_client_set_list(PyGObject *self, PyObject *args, PyObject *kwargs)
for (i = 0; i < PySequence_Size(py_list) && retdata; i++) {
gpointer data;
- data = pygconf_parse_pygvalue(list_type,
- PySequence_GetItem(py_list, i));
+ PyObject *item = PySequence_GetItem(py_list, i);
+ data = pygconf_parse_pygvalue(list_type, item);
+ Py_XDECREF(item);
if (data == NULL) {
retdata = 0;
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]