summaryrefslogtreecommitdiff
path: root/source3/torture/cmd_vfs.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-07-21 13:45:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:14 -0500
commit728dbab082f2c52d5aea5d16a8ffd84b9a8ab1b1 (patch)
tree73cc7fe28f7217d30fc58b92ad04dbb92154ccfb /source3/torture/cmd_vfs.c
parent63546f1c79db09c1d7032af8d941d6d9497280e7 (diff)
downloadsamba-728dbab082f2c52d5aea5d16a8ffd84b9a8ab1b1.tar.gz
samba-728dbab082f2c52d5aea5d16a8ffd84b9a8ab1b1.tar.bz2
samba-728dbab082f2c52d5aea5d16a8ffd84b9a8ab1b1.zip
r8682: fix vfstest, thanks to Rainer Link for spotting this one
(This used to be commit a3b89cb5c13b7e51f27b74b87c03002f537154d5)
Diffstat (limited to 'source3/torture/cmd_vfs.c')
-rw-r--r--source3/torture/cmd_vfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 974d3b8fee..cc683977e8 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -286,6 +286,7 @@ static NTSTATUS cmd_open(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
vfs->files[fd] = SMB_MALLOC_P(struct files_struct);
vfs->files[fd]->fsp_name = SMB_STRDUP(argv[1]);
+ vfs->files[fd]->fh = SMB_MALLOC_P(struct fd_handle);
vfs->files[fd]->fh->fd = fd;
vfs->files[fd]->conn = vfs->conn;
printf("open: fd=%d\n", fd);
@@ -345,6 +346,7 @@ static NTSTATUS cmd_close(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
printf("close: ok\n");
SAFE_FREE(vfs->files[fd]->fsp_name);
+ SAFE_FREE(vfs->files[fd]->fh);
SAFE_FREE(vfs->files[fd]);
vfs->files[fd] = NULL;
return NT_STATUS_OK;