From: Jeremy Allison Date: Tue, 24 Aug 2021 00:40:42 +0000 (-0700) Subject: s3: mdssvc: Correctly disconnect the VFS connection inside the mds_ctx destructor. X-Git-Tag: ldb-2.5.0~844 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4d8c62c4e8191e05fd03dd096a0bc989e224ed3;p=thirdparty%2Fsamba.git s3: mdssvc: Correctly disconnect the VFS connection inside the mds_ctx destructor. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14809 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/rpc_server/mdssvc/mdssvc.c b/source3/rpc_server/mdssvc/mdssvc.c index d0e87dcf646..fa31b55a183 100644 --- a/source3/rpc_server/mdssvc/mdssvc.c +++ b/source3/rpc_server/mdssvc/mdssvc.c @@ -1569,6 +1569,11 @@ static int mds_ctx_destructor_cb(struct mds_ctx *mds_ctx) } TALLOC_FREE(mds_ctx->ino_path_map); + if (mds_ctx->conn != NULL) { + SMB_VFS_DISCONNECT(mds_ctx->conn); + conn_free(mds_ctx->conn); + } + ZERO_STRUCTP(mds_ctx); return 0;