]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: missing tevent_req_nterror
authorRalph Boehme <slow@samba.org>
Thu, 16 Apr 2015 20:28:25 +0000 (22:28 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 28 Apr 2015 00:21:24 +0000 (02:21 +0200)
The error code path in case fsp == NULL misses a call
tevent_req_nterror().

https://bugzilla.samba.org/show_bug.cgi?id=11224

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit ad52dcdf5de6f5f2c2ee156d93ebbb343f39e526)

source3/smbd/aio.c

index 44d771ebf09b2d3098e30757895fad9bd6a68be2..c1e0ce2f10bc471a8cc125aaf554566181b8c413 100644 (file)
@@ -786,10 +786,10 @@ static void aio_pread_smb2_done(struct tevent_req *req)
                   (nread == -1) ? strerror(err) : "no error"));
 
        if (fsp == NULL) {
-               DEBUG( 3, ("aio_pread_smb2_done: file closed whilst "
-                          "aio outstanding (mid[%llu]).\n",
-                          (unsigned long long)aio_ex->smbreq->mid));
+               DEBUG(3, ("%s: request cancelled (mid[%ju])\n",
+                         __func__, (uintmax_t)aio_ex->smbreq->mid));
                TALLOC_FREE(aio_ex);
+               tevent_req_nterror(subreq, NT_STATUS_INTERNAL_ERROR);
                return;
        }
 
@@ -959,10 +959,10 @@ static void aio_pwrite_smb2_done(struct tevent_req *req)
                   (nwritten == -1) ? strerror(err) : "no error"));
 
        if (fsp == NULL) {
-               DEBUG( 3, ("aio_pwrite_smb2_done: file closed whilst "
-                          "aio outstanding (mid[%llu]).\n",
-                          (unsigned long long)aio_ex->smbreq->mid));
+               DEBUG(3, ("%s: request cancelled (mid[%ju])\n",
+                         __func__, (uintmax_t)aio_ex->smbreq->mid));
                TALLOC_FREE(aio_ex);
+               tevent_req_nterror(subreq, NT_STATUS_INTERNAL_ERROR);
                return;
        }