summaryrefslogtreecommitdiff
path: root/source4/param/pyparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/param/pyparam.c')
-rw-r--r--source4/param/pyparam.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index a248215fd9..3ba8146860 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -335,6 +335,10 @@ static PyObject *py_lp_ctx_new(PyTypeObject *type, PyObject *args, PyObject *kwa
return NULL;
}
ret->ptr = loadparm_init_global(false);
+ if (ret->ptr == NULL) {
+ PyErr_NoMemory();
+ return NULL;
+ }
return (PyObject *)ret;
}