libcli/smb: use tevent_req_received(req) in read_smb_recv()
authorStefan Metzmacher <metze@samba.org>
Thu, 21 May 2015 20:29:55 +0000 (22:29 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 12 Jun 2015 15:08:18 +0000 (17:08 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
libcli/smb/read_smb.c

index 26816c3be38f05e5767ae241988e17d159f99ac9..a40f702cffc353444ea2ecdec702d30fba1878c7 100644 (file)
@@ -105,8 +105,10 @@ ssize_t read_smb_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                req, struct read_smb_state);
 
        if (tevent_req_is_unix_error(req, perrno)) {
+               tevent_req_received(req);
                return -1;
        }
        *pbuf = talloc_move(mem_ctx, &state->buf);
+       tevent_req_received(req);
        return talloc_get_size(*pbuf);
 }