]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: mdssvc: Correctly disconnect the VFS connection inside the mds_ctx destructor.
authorJeremy Allison <jra@samba.org>
Tue, 24 Aug 2021 00:40:42 +0000 (17:40 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 25 Aug 2021 16:22:37 +0000 (16:22 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14809

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/rpc_server/mdssvc/mdssvc.c

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