summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-07-11 16:22:26 +0200
committerJeremy Allison <jra@samba.org>2013-07-11 20:56:42 +0200
commit940395d38bcc348eb5f1be7ba03cd554d9d3bc93 (patch)
treeee04fe72197a87e20db3ca99c85deadf2963502e /source3
parent02ff6ab5e778ceac30410136e622310b3a90e903 (diff)
downloadsamba-940395d38bcc348eb5f1be7ba03cd554d9d3bc93.tar.gz
samba-940395d38bcc348eb5f1be7ba03cd554d9d3bc93.tar.bz2
samba-940395d38bcc348eb5f1be7ba03cd554d9d3bc93.zip
smbd: Fix a 100% loop at shutdown time
In the destructor of fsp->aio_requests[0] we put another request into fsp->aio_requests[0]. Don't overwrite that with TALLOC_FREE. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jul 11 20:56:42 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/close.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 2bd588b176..f341c72952 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -640,9 +640,12 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
while (fsp->num_aio_requests != 0) {
/*
* The destructor of the req will remove
- * itself from the fsp
+ * itself from the fsp.
+ * Don't use TALLOC_FREE here, this will overwrite
+ * what the destructor just wrote into
+ * aio_requests[0].
*/
- TALLOC_FREE(fsp->aio_requests[0]);
+ talloc_free(fsp->aio_requests[0]);
}
}