From 233fc308763d7682035d14093af76f43591bec13 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Sun, 4 Jun 2006 12:26:59 +0000 Subject: 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. --- ChangeLog | 6 ++++++ gobject/gobjectmodule.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index d560b75..7c8fd96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-06-04 Johan Dahlin + + * 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 * tests/test_subtype.py: Uncomment Johan's "subsubtype" test case. diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index cd0532e..e5a972d 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); -- cgit