Fix crash due to uninitialized pointer (not a problem in 3.4.x or below).
authorJeremy Allison <jra@samba.org>
Wed, 25 Nov 2009 17:58:45 +0000 (09:58 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 25 Nov 2009 17:58:45 +0000 (09:58 -0800)
Jeremy.

source3/smbd/open.c

index 420b41cd04bce0ef38d2ded641651ba0dc840daf..72f6a008183f37c8ccc713fe6ec22b4143bb1ae2 100644 (file)
@@ -71,7 +71,7 @@ NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
 {
        /* Check if we have rights to open. */
        NTSTATUS status;
-       struct security_descriptor *sd;
+       struct security_descriptor *sd = NULL;
 
        *access_granted = 0;
 
@@ -94,7 +94,6 @@ NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
                        "on %s: %s\n",
                        smb_fname_str_dbg(smb_fname),
                        nt_errstr(status)));
-               TALLOC_FREE(sd);
                return status;
        }