mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r8682: fix vfstest, thanks to Rainer Link for spotting this one
This commit is contained in:
parent
afa8ae831a
commit
a3b89cb5c1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user