From 242ca5dba35ba282ddfe96751120810eadb4de8e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 9 Jul 2011 10:40:30 +0200 Subject: s3:smb2cli_base: unset the destructor in smb2cli_req_unset_pending() metze --- source3/libsmb/smb2cli_base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/libsmb') 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); } } -- cgit