summaryrefslogtreecommitdiff
path: root/source4/param/pyparam_util.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-03-01 22:23:45 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-04-08 23:22:55 +0200
commit814e20e7da60f0ec33dfea1d4d6dda1b653b818d (patch)
tree3172531816e162808f1c4d93b889f2d16fe7c3bd /source4/param/pyparam_util.c
parent7a6f1c78429183bd22e4b3e82881ac3ce2e0a1a7 (diff)
downloadsamba-814e20e7da60f0ec33dfea1d4d6dda1b653b818d.tar.gz
samba-814e20e7da60f0ec33dfea1d4d6dda1b653b818d.tar.bz2
samba-814e20e7da60f0ec33dfea1d4d6dda1b653b818d.zip
pynet: Create a net class.
Diffstat (limited to 'source4/param/pyparam_util.c')
-rw-r--r--source4/param/pyparam_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/param/pyparam_util.c b/source4/param/pyparam_util.c
index cc84395ea0..8136746f52 100644
--- a/source4/param/pyparam_util.c
+++ b/source4/param/pyparam_util.c
@@ -25,12 +25,12 @@
#define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_type(obj, struct loadparm_context)
-_PUBLIC_ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
+_PUBLIC_ struct loadparm_context *lp_from_py_object(TALLOC_CTX *mem_ctx, PyObject *py_obj)
{
struct loadparm_context *lp_ctx;
if (PyString_Check(py_obj)) {
- lp_ctx = loadparm_init(NULL);
+ lp_ctx = loadparm_init(mem_ctx);
if (!lp_load(lp_ctx, PyString_AsString(py_obj))) {
talloc_free(lp_ctx);
PyErr_Format(PyExc_RuntimeError, "Unable to load %s",
@@ -41,7 +41,7 @@ _PUBLIC_ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
}
if (py_obj == Py_None) {
- lp_ctx = loadparm_init(NULL);
+ lp_ctx = loadparm_init(mem_ctx);
/* We're not checking that loading the file succeeded *on purpose */
lp_load_default(lp_ctx);
return lp_ctx;