summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2018-04-24 12:37:02 +1200
committerAndrew Bartlett <abartlet@samba.org>2019-02-01 03:36:17 +0100
commita7e0741372d740b6999e873bf55fc6362d594c8e (patch)
treef5679fbb4f38c7fbede7f177035020f1f8f3e4b2
parentec1e56989b214376aa1c0a00368ffac11432cb94 (diff)
downloadsamba-a7e0741372d740b6999e873bf55fc6362d594c8e.tar.gz
s4/pyauth: check ldb argument in py_user_session()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/auth/pyauth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c
index 26d8277887e..a9a1ee10fcf 100644
--- a/source4/auth/pyauth.c
+++ b/source4/auth/pyauth.c
@@ -190,6 +190,10 @@ static PyObject *py_user_session(PyObject *module, PyObject *args, PyObject *kwa
}
ldb_ctx = pyldb_Ldb_AsLdbContext(py_ldb);
+ if (ldb_ctx == NULL) {
+ talloc_free(mem_ctx);
+ return NULL;
+ }
if (py_dn == Py_None) {
user_dn = NULL;