From 814e20e7da60f0ec33dfea1d4d6dda1b653b818d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 1 Mar 2010 22:23:45 +0100 Subject: pynet: Create a net class. --- source4/scripting/python/pyglue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index 629c9b11e2..f085714635 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -206,14 +206,15 @@ static PyObject *py_interface_ips(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "Oi", &py_lp_ctx, &all_interfaces)) return NULL; - lp_ctx = lp_from_py_object(py_lp_ctx); + tmp_ctx = talloc_new(NULL); + + lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */ if (lp_ctx == NULL) { PyErr_SetString(PyExc_TypeError, "Expected loadparm object"); + talloc_free(tmp_ctx); return NULL; } - tmp_ctx = talloc_new(NULL); - load_interfaces(tmp_ctx, lp_interfaces(lp_ctx), &ifaces); count = iface_count(ifaces); -- cgit