From: Jeremy Allison Date: Fri, 15 Feb 2008 02:05:37 +0000 (-0800) Subject: Allow auth_ntlmssp_end() to ignore null pointers passed in. X-Git-Tag: samba-3.2.0pre2~37^2~168 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7628f3a47166791db4cd6451d52ea3881a45bed;p=thirdparty%2Fsamba.git Allow auth_ntlmssp_end() to ignore null pointers passed in. Jeremy. --- diff --git a/source/auth/auth_ntlmssp.c b/source/auth/auth_ntlmssp.c index 526f2c93df0..ed66d0db0af 100644 --- a/source/auth/auth_ntlmssp.c +++ b/source/auth/auth_ntlmssp.c @@ -186,8 +186,13 @@ NTSTATUS auth_ntlmssp_start(AUTH_NTLMSSP_STATE **auth_ntlmssp_state) void auth_ntlmssp_end(AUTH_NTLMSSP_STATE **auth_ntlmssp_state) { - TALLOC_CTX *mem_ctx = (*auth_ntlmssp_state)->mem_ctx; + TALLOC_CTX *mem_ctx; + + if (*auth_ntlmssp_state == NULL) { + return; + } + mem_ctx = (*auth_ntlmssp_state)->mem_ctx; if ((*auth_ntlmssp_state)->ntlmssp_state) { ntlmssp_end(&(*auth_ntlmssp_state)->ntlmssp_state); }