diff options
-rw-r--r-- | source3/smbd/file_access.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c index 9fff8e3051..6ced6a6255 100644 --- a/source3/smbd/file_access.c +++ b/source3/smbd/file_access.c @@ -155,7 +155,10 @@ bool directory_has_default_acl(connection_struct *conn, const char *fname) NTSTATUS status = SMB_VFS_GET_NT_ACL(conn, fname, SECINFO_DACL, &secdesc); - if (!NT_STATUS_IS_OK(status) || secdesc == NULL) { + if (!NT_STATUS_IS_OK(status) || + secdesc == NULL || + secdesc->dacl == NULL) { + TALLOC_FREE(secdesc); return false; } |