From: Ralph Boehme Date: Fri, 19 Nov 2021 12:11:20 +0000 (+0100) Subject: mdssvc: fix check if search connection state is gone X-Git-Tag: samba-4.17.0rc1~118 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1150d121b7f6588de1aa37eac810c19dbfc07a71;p=thirdparty%2Fsamba.git mdssvc: fix check if search connection state is gone This was dead code: before this patchset noone set s->mds_es_ctx->mds_ctx to NULL. A previous commit changed that so now the mds_es_ctx destructor sets s->mds_es_ctx to NULL if a search "s" was currently in-flight. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14915 Signed-off-by: Ralph Boehme Reviewed-by: Noel Power --- diff --git a/source3/rpc_server/mdssvc/mdssvc_es.c b/source3/rpc_server/mdssvc/mdssvc_es.c index a0a93d31df0..5e9d76dd1de 100644 --- a/source3/rpc_server/mdssvc/mdssvc_es.c +++ b/source3/rpc_server/mdssvc/mdssvc_es.c @@ -685,7 +685,7 @@ static void mds_es_search_http_send_done(struct tevent_req *subreq) return; } - if (state->s->mds_es_ctx->mds_ctx == NULL) { + if (state->s->mds_es_ctx == NULL) { tevent_req_error(req, ECANCELED); return; } @@ -732,7 +732,7 @@ static void mds_es_search_http_read_done(struct tevent_req *subreq) tevent_req_done(req); return; } - if (s->mds_es_ctx->mds_ctx == NULL) { + if (s->mds_es_ctx == NULL) { tevent_req_error(req, ECANCELED); return; }