From 48d4aac563d8980571ae504dd9e63c0620eee4c6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 8 Sep 2015 08:18:02 +0200 Subject: [PATCH] fruit: Fix CID 1323186 Dereference before null check In all other "goto fail;" paths we had already dereferenced fsp, so the if-statement checking for fsp!=NULL was unnecessary. This fix gives us an additional error message in case check_aapl fails. Signed-off-by: Volker Lendecke Reviewed-by: Michael Adam Autobuild-User(master): Michael Adam Autobuild-Date(master): Tue Sep 8 13:47:01 CEST 2015 on sn-devel-104 --- source3/modules/vfs_fruit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 21b49f9bfa7..c90699f78ca 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -3318,7 +3318,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle, status = check_aapl(handle, req, in_context_blobs, out_context_blobs); if (!NT_STATUS_IS_OK(status)) { - return status; + goto fail; } SMB_VFS_HANDLE_GET_DATA(handle, config, struct fruit_config_data,