The branch, master has been updated via 7356e81 s3:vfs: fix valgrind warning in SMB_VFS_{PREAD,PWRITE,FSYNC}_RECV() from c86f6c2 s4: torture: Ensure we close the handle on the correct tree-id.
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 7356e814dfd3921e465a16cfe4b7998bc6f92dd1 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Aug 29 04:24:46 2018 +0200 s3:vfs: fix valgrind warning in SMB_VFS_{PREAD,PWRITE,FSYNC}_RECV() tevent_req_received() destroys 'state', so we need helper variables to hold the return value. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Stefan Metzmacher <me...@samba.org> Autobuild-Date(master): Tue Sep 4 10:45:10 CEST 2018 on sn-devel-144 ----------------------------------------------------------------------- Summary of changes: source3/smbd/vfs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 2687e35..a6c49cf 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2579,14 +2579,16 @@ ssize_t SMB_VFS_PREAD_RECV(struct tevent_req *req, { struct smb_vfs_call_pread_state *state = tevent_req_data( req, struct smb_vfs_call_pread_state); + ssize_t retval; if (tevent_req_is_unix_error(req, &vfs_aio_state->error)) { tevent_req_received(req); return -1; } *vfs_aio_state = state->vfs_aio_state; + retval = state->retval; tevent_req_received(req); - return state->retval; + return retval; } ssize_t smb_vfs_call_pwrite(struct vfs_handle_struct *handle, @@ -2653,14 +2655,16 @@ ssize_t SMB_VFS_PWRITE_RECV(struct tevent_req *req, { struct smb_vfs_call_pwrite_state *state = tevent_req_data( req, struct smb_vfs_call_pwrite_state); + ssize_t retval; if (tevent_req_is_unix_error(req, &vfs_aio_state->error)) { tevent_req_received(req); return -1; } *vfs_aio_state = state->vfs_aio_state; + retval = state->retval; tevent_req_received(req); - return state->retval; + return retval; } off_t smb_vfs_call_lseek(struct vfs_handle_struct *handle, @@ -2748,14 +2752,16 @@ int SMB_VFS_FSYNC_RECV(struct tevent_req *req, struct vfs_aio_state *vfs_aio_sta { struct smb_vfs_call_fsync_state *state = tevent_req_data( req, struct smb_vfs_call_fsync_state); + ssize_t retval; if (tevent_req_is_unix_error(req, &vfs_aio_state->error)) { tevent_req_received(req); return -1; } *vfs_aio_state = state->vfs_aio_state; + retval = state->retval; tevent_req_received(req); - return state->retval; + return retval; } /* -- Samba Shared Repository