summaryrefslogtreecommitdiff
path: root/source4/libcli/auth/gensec.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/auth/gensec.c')
-rw-r--r--source4/libcli/auth/gensec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c
index 360a69c0e0..3cf96de4b3 100644
--- a/source4/libcli/auth/gensec.c
+++ b/source4/libcli/auth/gensec.c
@@ -443,6 +443,9 @@ NTSTATUS gensec_update(struct gensec_security *gensec_security, TALLOC_CTX *out_
void gensec_end(struct gensec_security **gensec_security)
{
+ if (!*gensec_security) {
+ return;
+ }
if ((*gensec_security)->ops) {
(*gensec_security)->ops->end(*gensec_security);
}