diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/smb2cli_base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c index b12e939a39..7678cb9dc6 100644 --- a/source3/libsmb/smb2cli_base.c +++ b/source3/libsmb/smb2cli_base.c @@ -50,6 +50,8 @@ static void smb2cli_req_unset_pending(struct tevent_req *req) int num_pending = talloc_array_length(cli->pending); int i; + talloc_set_destructor(req, NULL); + if (num_pending == 1) { /* * The pending read_smb tevent_req is a child of @@ -492,8 +494,7 @@ static void smb2cli_inbuf_received(struct tevent_req *subreq) */ while (talloc_array_length(cli->pending) > 0) { req = cli->pending[0]; - talloc_set_destructor(req, NULL); - smb2cli_req_destructor(req); + smb2cli_req_unset_pending(req); tevent_req_nterror(req, status); } } |