s3:mdssvc: add missing mds_ctx deallocation
authorRalph Boehme <slow@samba.org>
Tue, 13 Aug 2019 12:16:07 +0000 (14:16 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 9 Oct 2019 14:35:29 +0000 (14:35 +0000)
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 <slow@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
source3/rpc_server/mdssvc/srv_mdssvc_nt.c

index c5e5a46c01e89de6e4f475a1aabaac9206f3afa0..aea6019e8717bffe881347c7b80c2973b747e1aa 100644 (file)
@@ -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);