]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fix a 100% loop at shutdown time
authorVolker Lendecke <vl@samba.org>
Thu, 11 Jul 2013 14:22:26 +0000 (16:22 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 11 Jul 2013 18:56:42 +0000 (20:56 +0200)
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

source3/smbd/close.c

index 2bd588b176190e3e008266b79969f70e569c7d1c..f341c729521ae68026bd6a2db56f8c1a620cc446 100644 (file)
@@ -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]);
                }
        }