s3:libsmb/async_smb: call cli_smb_req_unset_pending() instead of destructor directly
authorStefan Metzmacher <metze@samba.org>
Wed, 8 Jun 2011 12:14:24 +0000 (14:14 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 10 Jun 2011 17:27:05 +0000 (19:27 +0200)
metze

source3/libsmb/async_smb.c

index 45e83b87c21b2f1db9ecd58ac91ce36fb37b918c..2e0ddb9fdb0730f47c25112a842b8753f6acd0b5 100644 (file)
@@ -627,7 +627,7 @@ static void cli_smb_received(struct tevent_req *subreq)
        if (state->chained_requests == NULL) {
                state->inbuf = talloc_move(state, &inbuf);
                talloc_set_destructor(req, NULL);
-               cli_smb_req_destructor(req);
+               cli_smb_req_unset_pending(req);
                state->chain_num = 0;
                state->chain_length = 1;
                tevent_req_done(req);
@@ -671,7 +671,7 @@ static void cli_smb_received(struct tevent_req *subreq)
        while (talloc_array_length(cli->pending) > 0) {
                req = cli->pending[0];
                talloc_set_destructor(req, NULL);
-               cli_smb_req_destructor(req);
+               cli_smb_req_unset_pending(req);
                tevent_req_nterror(req, status);
        }
 }