From 625126dc8dec1198b94bda0643222f0b046587d8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Oct 2010 14:16:30 -0700 Subject: Fix valgrind "uninitialized read" error on "info" when returning !NT_STATUS_OK. Jeremy. --- source3/modules/vfs_acl_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3') 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; } -- cgit