From 1c3c9a483be6d63b8efb67bfd2c04ef9302ccce6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 22 Sep 2010 16:44:17 -0700 Subject: s4-param: Fix more memory leaks, invalid memory context. --- source4/scripting/python/pyglue.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/scripting/python/pyglue.c') diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index 2afd1fa0104..627443dee5f 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -131,6 +131,10 @@ static PyObject *py_interface_ips(PyObject *self, PyObject *args) return NULL; tmp_ctx = talloc_new(NULL); + if (tmp_ctx == NULL) { + PyErr_NoMemory(); + return NULL; + } lp_ctx = lpcfg_from_py_object(tmp_ctx, py_lp_ctx); if (lp_ctx == NULL) { -- cgit