fruit: Fix CID 1323186 Dereference before null check
authorVolker Lendecke <vl@samba.org>
Tue, 8 Sep 2015 06:18:02 +0000 (08:18 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 8 Sep 2015 11:47:01 +0000 (13:47 +0200)
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 <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Sep  8 13:47:01 CEST 2015 on sn-devel-104

source3/modules/vfs_fruit.c

index 21b49f9bfa7be1177210695255e1259a7692a187..c90699f78ca2292bd8a7c762671100394bded193 100644 (file)
@@ -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,