summaryrefslogtreecommitdiffstats
path: root/gobject
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2007-04-30 02:28:54 +0000
committerJohan Dahlin <johan@src.gnome.org>2007-04-30 02:28:54 +0000
commit18b7f5d76af7f894564649f54e05e992c09cd999 (patch)
tree59832a93cac55d9384923ffc28abf0a719388d31 /gobject
parent5a1164a7d6e7202e2c6d8cec0e859a89cf46ad2c (diff)
downloadpygobject-18b7f5d76af7f894564649f54e05e992c09cd999.tar.gz
pygobject-18b7f5d76af7f894564649f54e05e992c09cd999.tar.xz
pygobject-18b7f5d76af7f894564649f54e05e992c09cd999.zip
Fix leak, patch by Daniel Berrange. Fixes #428726 (Phil Dumont)
* gobject/pygflags.c: (pyg_flags_from_gtype): Fix leak, patch by Daniel Berrange. Fixes #428726 (Phil Dumont) svn path=/trunk/; revision=653
Diffstat (limited to 'gobject')
-rw-r--r--gobject/pygflags.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gobject/pygflags.c b/gobject/pygflags.c
index bfd5128..853f5c2 100644
--- a/gobject/pygflags.c
+++ b/gobject/pygflags.c
@@ -184,9 +184,9 @@ pyg_flags_from_gtype (GType gtype, int value)
((PyIntObject*)retval)->ob_ival = value;
((PyGFlags*)retval)->gtype = gtype;
- }
-
- Py_INCREF(retval);
+ } else {
+ Py_INCREF(retval);
+ }
return retval;
}