From 3fea9df85a7d489b81e21a7a63f9e115de712d4c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 22 Sep 2010 15:35:36 -0700 Subject: s4-param: Check type when converting python object to lp_ctx, fix some memory leaks. --- source4/scripting/python/pyglue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/scripting/python/pyglue.c') diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index 1f968e16f9..2afd1fa010 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -132,9 +132,8 @@ static PyObject *py_interface_ips(PyObject *self, PyObject *args) tmp_ctx = talloc_new(NULL); - lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */ + lp_ctx = lpcfg_from_py_object(tmp_ctx, py_lp_ctx); if (lp_ctx == NULL) { - PyErr_SetString(PyExc_TypeError, "Expected loadparm object"); talloc_free(tmp_ctx); return NULL; } -- cgit