summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_acl_common.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-10-15 14:16:30 -0700
committerJeremy Allison <jra@samba.org>2010-10-15 17:38:21 -0700
commit625126dc8dec1198b94bda0643222f0b046587d8 (patch)
tree9d52a106faa8183538d3641863f662ff89e61dfb /source3/modules/vfs_acl_common.c
parent8cad5e23b6e2440a566def6fb138d484e3b47643 (diff)
downloadsamba-625126dc8dec1198b94bda0643222f0b046587d8.tar.gz
samba-625126dc8dec1198b94bda0643222f0b046587d8.tar.bz2
samba-625126dc8dec1198b94bda0643222f0b046587d8.zip
Fix valgrind "uninitialized read" error on "info" when returning !NT_STATUS_OK.
Jeremy.
Diffstat (limited to 'source3/modules/vfs_acl_common.c')
-rw-r--r--source3/modules/vfs_acl_common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 2ddcd0ea23..8ea0fb8b16 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -895,6 +895,10 @@ static NTSTATUS create_file_acl_common(struct vfs_handle_struct *handle,
result,
&info);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto out;
+ }
+
if (info != FILE_WAS_CREATED) {
/* File/directory was opened, not created. */
goto out;
@@ -902,7 +906,7 @@ static NTSTATUS create_file_acl_common(struct vfs_handle_struct *handle,
fsp = *result;
- if (!NT_STATUS_IS_OK(status) || fsp == NULL) {
+ if (fsp == NULL) {
/* Only handle success. */
goto out;
}