From: Ralph Boehme Date: Thu, 18 Nov 2021 15:51:36 +0000 (+0100) Subject: mdssvc: reapply default search destructor when marking a search non-pending X-Git-Tag: samba-4.17.0rc1~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b0e61ff75db0d875da81ada6d2333b01985d264;p=thirdparty%2Fsamba.git mdssvc: reapply default search destructor when marking a search non-pending This is needed to ensure searches that are scheduled more then once to the Elasticsarch server (because the first run didn't return all results) get removed from the list of searches in case the user closes the query. 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 b16426bc65a..a0a93d31df0 100644 --- a/source3/rpc_server/mdssvc/mdssvc_es.c +++ b/source3/rpc_server/mdssvc/mdssvc_es.c @@ -564,7 +564,7 @@ static void mds_es_search_unset_pending(struct sl_es_search *s) } s->pending = false; - talloc_set_destructor(s, NULL); + talloc_set_destructor(s, search_destructor); } static struct tevent_req *mds_es_search_send(TALLOC_CTX *mem_ctx,