s3-vfstest: Fix a double-free on closing a file
authorVolker Lendecke <vl@samba.org>
Thu, 2 Feb 2012 15:23:40 +0000 (16:23 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 2 Feb 2012 15:26:16 +0000 (16:26 +0100)
"mem_ctx" will be gone after we leave the routine

source3/torture/cmd_vfs.c

index 7c44a48f55ad23108e37e35802d3f021d871608e..667cc1678e00917bb78baed33dad0bfcfdbe9305 100644 (file)
@@ -329,7 +329,7 @@ static NTSTATUS cmd_open(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
        }
        fsp->conn = vfs->conn;
 
-       status = create_synthetic_smb_fname_split(mem_ctx, argv[1], NULL,
+       status = create_synthetic_smb_fname_split(NULL, argv[1], NULL,
                                                  &smb_fname);
        if (!NT_STATUS_IS_OK(status)) {
                SAFE_FREE(fsp);