summaryrefslogtreecommitdiff
path: root/source4/auth/gensec/pygensec.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/auth/gensec/pygensec.c')
-rw-r--r--source4/auth/gensec/pygensec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c
index cd05bd7ccf..5fe3703138 100644
--- a/source4/auth/gensec/pygensec.c
+++ b/source4/auth/gensec/pygensec.c
@@ -113,6 +113,11 @@ static PyObject *py_gensec_start_client(PyTypeObject *type, PyObject *args, PyOb
}
settings->lp_ctx = loadparm_init_global(true);
+ if (settings->lp_ctx == NULL) {
+ PyErr_NoMemory();
+ PyObject_DEL(self);
+ return NULL;
+ }
}
ev = tevent_context_init(self->talloc_ctx);
@@ -181,6 +186,11 @@ static PyObject *py_gensec_start_server(PyTypeObject *type, PyObject *args, PyOb
}
settings->lp_ctx = loadparm_init_global(true);
+ if (settings->lp_ctx == NULL) {
+ PyErr_NoMemory();
+ PyObject_DEL(self);
+ return NULL;
+ }
}
ev = tevent_context_init(self->talloc_ctx);