diff options
-rw-r--r-- | gi/pygflags.c | 5 | ||||
-rw-r--r-- | gi/pygi-info.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gi/pygflags.c b/gi/pygflags.c index a9c443b6..df1280f9 100644 --- a/gi/pygflags.c +++ b/gi/pygflags.c @@ -108,10 +108,13 @@ pyg_flags_repr(PyGFlags *self) tmp = generate_repr(self->gtype, (guint)PyLong_AsUnsignedLongMask ((PyObject*)self)); module = PyObject_GetAttrString ((PyObject *)self, "__module__"); - if (module == NULL) + if (module == NULL) { + g_free (tmp); return NULL; + } if (!PyUnicode_Check (module)) { + g_free (tmp); Py_DECREF (module); return NULL; } diff --git a/gi/pygi-info.c b/gi/pygi-info.c index 19894e49..aee5d4db 100644 --- a/gi/pygi-info.c +++ b/gi/pygi-info.c @@ -1862,6 +1862,7 @@ _pygi_g_registered_type_info_check_object (GIRegisteredTypeInfo *info, object_type = (PyTypeObject *) PyObject_Type (object); if (object_type == NULL) { + g_free (type_name_expected); return -1; } |