summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/async_smb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 9dc4955531..9a5807fd41 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -132,6 +132,8 @@ void cli_smb_req_unset_pending(struct tevent_req *req)
return;
}
+ talloc_set_destructor(req, NULL);
+
if (num_pending == 1) {
/*
* The pending read_smb tevent_req is a child of
@@ -661,7 +663,6 @@ 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_unset_pending(req);
state->chain_num = 0;
state->chain_length = 1;