summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-11-29 14:46:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:13 -0500
commit692e1a214c8478ea9199542920b7083138f90691 (patch)
tree6784a2949c1ab9007ab7a91a0ad115351c6b8200 /source4
parent15543f18acc9040fd3213e826147fe5604bb1ae1 (diff)
downloadsamba-692e1a214c8478ea9199542920b7083138f90691.tar.gz
samba-692e1a214c8478ea9199542920b7083138f90691.tar.bz2
samba-692e1a214c8478ea9199542920b7083138f90691.zip
r4001: fix segfault fix auth failed
metze (This used to be commit 6a7eee1d9917e0884072354dddae568645798da5)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/auth/gensec.c3
-rw-r--r--source4/librpc/rpc/dcerpc_auth.c1
2 files changed, 4 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);
}
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c
index af138ffe2c..7e581992fa 100644
--- a/source4/librpc/rpc/dcerpc_auth.c
+++ b/source4/librpc/rpc/dcerpc_auth.c
@@ -113,6 +113,7 @@ done:
talloc_destroy(mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
+ gensec_end(&p->security_state.generic_state);
ZERO_STRUCT(p->security_state);
} else {
/* Authenticated connections use the generic session key */