From 961afddd1f2edf0a22a6808fdf477c360d1c5528 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 22 Oct 2010 14:54:19 -0700 Subject: [PATCH] Fix valgrind "uninitialized read" error on "info" when returning !NT_STATUS_OK. (cherry picked from commit 9b615ce8706f4f4c59055fe155446f1fdac36323) --- source3/modules/vfs_acl_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index ae81cff01ad..24158a6813c 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -889,6 +889,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; @@ -896,7 +900,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; } -- 2.11.4.GIT