22 lines
540 B
Diff
22 lines
540 B
Diff
--- pygobject-2.12.3/gobject/pygflags.c.memory-leak 2007-04-19 21:29:49.000000000 -0400
|
|
+++ pygobject-2.12.3/gobject/pygflags.c 2007-04-19 21:30:33.000000000 -0400
|
|
@@ -176,7 +176,9 @@
|
|
retval = PyDict_GetItem(values, pyint);
|
|
Py_DECREF(pyint);
|
|
|
|
- if (!retval) {
|
|
+ if (retval) {
|
|
+ Py_INCREF(retval);
|
|
+ } else {
|
|
PyErr_Clear();
|
|
|
|
retval = ((PyTypeObject *)pyclass)->tp_alloc((PyTypeObject *)pyclass, 0);
|
|
@@ -186,7 +188,6 @@
|
|
((PyGFlags*)retval)->gtype = gtype;
|
|
}
|
|
|
|
- Py_INCREF(retval);
|
|
return retval;
|
|
}
|
|
|