From nobody Mon Feb 12 17:43:48 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 4TYWz913S7z5BD7N; Mon, 12 Feb 2024 17:43:49 +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 4TYWz85hl5z4Vdp; Mon, 12 Feb 2024 17:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707759828; 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=1ocQawsIivLG88C0IUnJnK4NTq/X6PqEXiD+hmI4Ju0=; b=mw9ZCdkrWKk9X0QxdT4rdB7/GfhNciPJIBFE6gILxkBPVqjVMwOiF8bIs6zGBiBpvliTId 6TbwrgjpXoyvmASowgY9DZrvPupFrx7DUsQW3VyLZmoBz6xhnqmPY9rGngPY5EVYVOeqF4 HcJiMiAUOCHQy6Zfifpn2oXler3iXYf3GrLv0PjAZLxdV4rkP34rPpxsBPoBVf9X73Zrex nh6kiUOOz6+NyVQEcpHyPD6ujF91zuQepLXFTV6Imtb9t0pnTpP49azpM03bXceFZ403ac +BXLm5yaqbNZOMgvYN4kkLk56+ELuecHasqCUZmNN8LnbAvKVzPKb86fjh9Lrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707759828; a=rsa-sha256; cv=none; b=LGyVpchep0ErJkIP6nhZBwM/w/UJAttp/J/TqVbCltIOacUjt5hhCuNTxNb93S/Jhz0a8e GTn56WZNpTfKHnQTYrcj2R63gxWYjlTbj9wg5vbdZT7IpxqiQ0Zkqo+o09go3cOMt1W7uZ IoMDCgAdk+YhsjFfLKtQqq52n0YbQbLqK6xNdtft8qsDdVCpAPNKNPeF89yLZMTcKGEb07 z5WNLs597vEhHCSAlyXYsfUJHgTQcg0PCk6ItIt90GhkoFm3LVbLz8HR4Df099NDPhMZpM chL8isRPbc7NYWeZrPBbYbd2M3kqGIwnVIuAkXGsXXfkaVHTC1FUyE5nDD7opQ== 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=1707759828; 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=1ocQawsIivLG88C0IUnJnK4NTq/X6PqEXiD+hmI4Ju0=; b=IBUAcWqRI+PrMikD5KfbCKVqcvm5WUPvPMPI1+If5aTxj9hGsYLk4hoek31hMmcvcj0on+ l5VhSKHqhbLZaiwR0JXyObTcJdz4h1p8EQuEtGHOJyQnIUlJE9E3hI9MXoCciLUSIqCx+k LsYTbmUfsUhpuD0wVjkhYiu6IAdHXZugALUIzqsVwsrF4XgQL+7UQ1yo9gxiF42YRey5C0 x5kOd8yC1c7xiFtEJziFfsjdPvCybMfGtqrigSiZleHB3y6E1Yc+W0qOvopQj498xz1Icj iXvSGODMmNZO1D9H5wUjo4HmSI5CHl6v4mt3281DYrqxE70QX0szLFh2giLCqw== 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 4TYWz84nzNzh9N; Mon, 12 Feb 2024 17:43:48 +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 41CHhmiu012318; Mon, 12 Feb 2024 17:43:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41CHhm3v012315; Mon, 12 Feb 2024 17:43:48 GMT (envelope-from git) Date: Mon, 12 Feb 2024 17:43:48 GMT Message-Id: <202402121743.41CHhm3v012315@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: 314a881fce0c - stable/14 - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/14 X-Git-Reftype: branch X-Git-Commit: 314a881fce0cd48ee4f67fb924432f53d4de0ea0 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=314a881fce0cd48ee4f67fb924432f53d4de0ea0 commit 314a881fce0cd48ee4f67fb924432f53d4de0ea0 Author: Alan Somers AuthorDate: 2024-01-17 21:13:05 +0000 Commit: Alan Somers CommitDate: 2024-02-12 17:43:07 +0000 fusefs: fix some memory leaks in the tests (cherry picked from commit 39f5d8dd1b2fea7cff0770efb0bc3d6e33e24279) --- tests/sys/fs/fusefs/fallocate.cc | 2 ++ tests/sys/fs/fusefs/mockfs.cc | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/sys/fs/fusefs/fallocate.cc b/tests/sys/fs/fusefs/fallocate.cc index 92e327be5ade..ff5e3eb4f4bb 100644 --- a/tests/sys/fs/fusefs/fallocate.cc +++ b/tests/sys/fs/fusefs/fallocate.cc @@ -302,6 +302,7 @@ TEST_F(Fspacectl, 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(-1, fspacectl(fd, SPACECTL_DEALLOC, &rqsr, 0, NULL)); EXPECT_EQ(EROFS, errno); @@ -633,6 +634,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(_, _))