summaryrefslogtreecommitdiff
path: root/source4/auth/gensec
diff options
context:
space:
mode:
authorLumir Balhar <lbalhar@redhat.com>2017-01-30 14:18:46 +0100
committerAndrew Bartlett <abartlet@samba.org>2017-03-10 07:31:12 +0100
commit0672fc145aad731c8771746d1d7c9881b48e3522 (patch)
tree3416c10e2c429d72b30c18ad6eac158d0baaf3de /source4/auth/gensec
parentd0914e271305d48cfdf6908ee46a1e8a56aefa0a (diff)
downloadsamba-0672fc145aad731c8771746d1d7c9881b48e3522.tar.gz
python: samba.gensec: Fix error handling in set_credentials() function
Add `return NULL;` to error handling part of `set_credentials()` function. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r--source4/auth/gensec/pygensec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c
index eba84f0b856..56016af3127 100644
--- a/source4/auth/gensec/pygensec.c
+++ b/source4/auth/gensec/pygensec.c
@@ -255,6 +255,7 @@ static PyObject *py_gensec_set_credentials(PyObject *self, PyObject *args)
PyErr_Format(PyExc_TypeError,
"Expected samba.credentaials for credentials argument got %s",
talloc_get_name(pytalloc_get_ptr(py_creds)));
+ return NULL;
}
status = gensec_set_credentials(security, creds);