From nobody Thu Jun 13 19:41:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0Xpm49Hlz5PDxJ; Thu, 13 Jun 2024 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0Xpm1x0gz4tbf; Thu, 13 Jun 2024 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B81q4zBjRw4OSZta0ieWPs++qp98Qrvbjw5jBQrp2Fs=; b=UxM2jXx36qF+Dcw081jVcXOV8v/sYt9NsLgbmBCTgj+oxYOSTNUsSezgHFDw9bPgPUMWD8 YgBygYvfBrSWRULpnOnK9NeIq/9jgeQJ+BeQfc2hMr2EhPJusY1u/4mc0We9Hy8glWNu7M vfyH/Z7UTmo6MjXZX9XCfeconFzPxDENGhvrfTOpG1M6ZXB7/P0k0KV0Oj6VhQaO7Mxx2d bYFeKet6Nxbu72m9sP+uljruYl/Su+9DUVDTPhSJbl/4ubNmBCfGSUEO4prsny/f3mEbC1 S81buQLLIeWKWUxAbdFYOsCtxLBvgYP3fzGAVV5HJWYQveAmI8dAVVi7DtUWYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718307696; a=rsa-sha256; cv=none; b=suNPRu2iF0uxwhoHY4fUixL6uhVgCVf9oll4dBjfSerrWxw3Wulhe/SwnVPz4lG++JQQye LzpF9/YhtArijhu6wvsqTX98KQ5YIPCdx/x3t/zrIUUNWQ7YQe6qoYU+8UqPYDJeaO5yke EhTfxqvcMbYyeq/pRWru2Yv01IDMjArOSCVgr06DME7YPqkjFnxj5ziJpjEEnOpLI7UMqE LKuHgGYbNkL3paWXXxbnyE5ym94paTcqUGnfq+6StPmab0VXKRx/2BEGtqVu2+Nk3GpFBb goAGM4oEhiFanTd3umXdaLUhokrFz2sYtDLU4HMQlvrWgSJs8shd83ZWG54EHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718307696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B81q4zBjRw4OSZta0ieWPs++qp98Qrvbjw5jBQrp2Fs=; b=brOwqgBmAxiukYy1DxVGZWPRM5cfvgHeKdq+2vTCBMgSdYg8WUe8wA8N1ICOTKHRW3r+EM zEVLSzx7f8LF/V+6OM+XYX9T7kLIAClFwQLpOHm+oHxMSoh6IKQNGqdiqzFRsuAiPVgtny 2O013hbfPV8ybXz7qe8FfEIbwd6CB593KmJaCs7QH4/uYPdPu4WybfiagmNZKVf6YVtzQB s/SKfFmUpnJ2pUYqS9bdtPUntA5AaNfzIW+BuCaf2LUBQU2gQhc3eXR94fFZbXLCV0H4Qe CWGEaolvHFow0ebq7q1eFANPZet9NCOjXxR21G2KKPsPEoQ92dTl6PE/iGw9Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W0Xpm1P3hzq2k; Thu, 13 Jun 2024 19:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45DJfa6D087013; Thu, 13 Jun 2024 19:41:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DJfagT087010; Thu, 13 Jun 2024 19:41:36 GMT (envelope-from git) Date: Thu, 13 Jun 2024 19:41:36 GMT Message-Id: <202406131941.45DJfagT087010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: f5f1f1115f5b - stable/13 - fusefs: fix some memory leaks in the tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 Auto-Submitted: auto-generated The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 commit f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 Author: Alan Somers AuthorDate: 2024-01-17 21:13:05 +0000 Commit: Alan Somers CommitDate: 2024-06-13 19:40:59 +0000 fusefs: fix some memory leaks in the tests (cherry picked from commit 39f5d8dd1b2fea7cff0770efb0bc3d6e33e24279) --- tests/sys/fs/fusefs/fallocate.cc | 1 + tests/sys/fs/fusefs/mockfs.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/sys/fs/fusefs/fallocate.cc b/tests/sys/fs/fusefs/fallocate.cc index 73717d6b5ce7..56ab4b698f2a 100644 --- a/tests/sys/fs/fusefs/fallocate.cc +++ b/tests/sys/fs/fusefs/fallocate.cc @@ -201,6 +201,7 @@ TEST_F(PosixFallocate, erofs) build_iovec(&iov, &iovlen, "fspath", (void*)statbuf.f_mntonname, -1); build_iovec(&iov, &iovlen, "from", __DECONST(void *, "/dev/fuse"), -1); ASSERT_EQ(0, nmount(iov, iovlen, newflags)) << strerror(errno); + free_iovec(&iov, &iovlen); EXPECT_EQ(EROFS, posix_fallocate(fd, offset, length)); diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 92fc0c0d97a1..bd7bd1b663f9 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -521,6 +521,7 @@ MockFS::MockFS(int max_readahead, bool allow_other, bool default_permissions, if (nmount(iov, iovlen, 0)) throw(std::system_error(errno, std::system_category(), "Couldn't mount filesystem")); + free_iovec(&iov, &iovlen); // Setup default handler ON_CALL(*this, process(_, _))