]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Allow auth_ntlmssp_end() to ignore null pointers passed in.
authorJeremy Allison <jra@samba.org>
Fri, 15 Feb 2008 02:05:37 +0000 (18:05 -0800)
committerJeremy Allison <jra@samba.org>
Fri, 15 Feb 2008 02:05:37 +0000 (18:05 -0800)
Jeremy.

source/auth/auth_ntlmssp.c

index 526f2c93df0f3a733a8735998353d35c852ad34c..ed66d0db0afeed1147a797ed00d97d4e98415008 100644 (file)
@@ -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);
        }