From: Ralph Boehme Date: Tue, 13 Aug 2019 12:16:07 +0000 (+0200) Subject: s3:mdssvc: add missing mds_ctx deallocation X-Git-Tag: talloc-2.3.1~444 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c338bdf5a4aef16cb3048b18c77a0095f3fc3e53;p=thirdparty%2Fsamba.git s3:mdssvc: add missing mds_ctx deallocation The mds_ctx object was created in _mdssvc_open() as a talloc child of the pipe which means as long as the pipe is connected it's not freed. To ensure we do proper rundown of all resources including backend connections and pending queries, we must free the mds_ctx object. Signed-off-by: Ralph Boehme Reviewed-by: Noel Power --- diff --git a/source3/rpc_server/mdssvc/srv_mdssvc_nt.c b/source3/rpc_server/mdssvc/srv_mdssvc_nt.c index c5e5a46c01e..aea6019e871 100644 --- a/source3/rpc_server/mdssvc/srv_mdssvc_nt.c +++ b/source3/rpc_server/mdssvc/srv_mdssvc_nt.c @@ -318,6 +318,7 @@ void _mdssvc_close(struct pipes_struct *p, struct mdssvc_close *r) } DBG_DEBUG("Close mdssvc handle for path: %s\n", mds_ctx->spath); + TALLOC_FREE(mds_ctx); *r->out.out_handle = r->in.in_handle; close_policy_hnd(p, &r->in.in_handle);