summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2006-06-04 12:26:59 +0000
committerJohan Dahlin <johan@src.gnome.org>2006-06-04 12:26:59 +0000
commit233fc308763d7682035d14093af76f43591bec13 (patch)
tree1541522f05f6d6d09323949293354d32e5e69e46
parente6ef557a9ba22f8b8afb0e772c206589dbbb0b9a (diff)
downloadpygobject-233fc308763d7682035d14093af76f43591bec13.tar.gz
Fix two leaks in error cases, found by Coverity.
* gobject/gobjectmodule.c (pyg_spawn_async) (pyg_signal_new): Fix two leaks in error cases, found by Coverity.
-rw-r--r--ChangeLog6
-rw-r--r--gobject/gobjectmodule.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d560b759..7c8fd961 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-04 Johan Dahlin <johan@gnome.org>
+
+ * gobject/gobjectmodule.c (pyg_spawn_async)
+ (pyg_signal_new): Fix two leaks in error cases, found by
+ Coverity.
+
2006-05-28 Gustavo J. A. M. Carneiro <gjc@gnome.org>
* tests/test_subtype.py: Uncomment Johan's "subsubtype" test case.
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index cd0532e1..e5a972d2 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -1394,6 +1394,7 @@ pyg_signal_new(PyObject *self, PyObject *args)
Py_DECREF(item);
PyErr_SetString(PyExc_TypeError,
"argument 5 must be a sequence of GType codes");
+ g_free(param_types);
return NULL;
}
Py_DECREF(item);
@@ -2328,6 +2329,7 @@ pyg_spawn_async(PyObject *unused, PyObject *args, PyObject *kwargs)
"second argument must be a sequence of strings");
g_free(envp);
Py_XDECREF(tmp);
+ g_free(argv);
return NULL;
}
envp[i] = PyString_AsString(tmp);