summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--ChangeLog5
-rw-r--r--gobject/pygflags.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d8213f..ffca7c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-29 Johan Dahlin <johan@gnome.org>
+
+ * gobject/pygflags.c: (pyg_flags_from_gtype):
+ Fix leak, patch by Daniel Berrange. Fixes #428726 (Phil Dumont)
+
2007-04-29 Damien Carbery <damien.carbery@sun.com>
reviewed by: Johan Dahlin <johan@gnome.org>
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;
}