From nobody Fri Jan 19 17:51:01 2024 X-Original-To: dev-commits-src-main@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 4TGnGZ19lWz571v3; Fri, 19 Jan 2024 17:51:02 +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 4TGnGZ0Y9Jz4W1b; Fri, 19 Jan 2024 17:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705686662; 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=N4/ERfMSobQ+HhNM36bAN3A8HET2usB+ik8j0azBsSA=; b=cCngyc1jWRC3abDMZJNwF4Q3RtNWP6fnQuJBjzDRDiFDUDkjqCsRfKan+hZumAnICsILEt 5HpSAupBdOL0FNNF6pPVtzE+HnTihgHzkD+WnvnwMjk6+BrAoIjjA8jhFlgKkaGPl0PfzT hQxpxXhfp/pxH09bvjCihA7jWmx/thFK04wS8AKl/qOZUm4ZzIYXILou01WqWH09Alseye ms5MYysVx3lYe0HJwDJDv6m30W/agym8EX8coMhTpAqt5j8WIfNrxPI79il2loqtiN+hqe n7W5btG1L7FMWZGYnH/RPiqEWWmcAk7mbloDvva1EjanFhvky++akOoFjhjxRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705686662; 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=N4/ERfMSobQ+HhNM36bAN3A8HET2usB+ik8j0azBsSA=; b=Lc4zh9UrN7LRFgzX126qfEAO3BBrxbpfeTPnMF3B2T4886U8v/poppuuDWrNg/df4T0hRC aqEVACQGtgege+fWcoAcn89hewCLCK49KyTpSf3xj0SrIFnnexJSkLAX1x5gnSZrXXf/2G R79IWzaURHzBbG9fJwg0njocGM9LSnF0hqjRxFY36XOAT/t4aCuNkuTuEkIxbdyj1OJMi8 XsRxRmuu1ectsh3Jpt/dN8YBCm+CFM7DOMzDM4OkDkucnpvHqL9W0uFo7BmWvjIVCIQsEf P/k6fn15poQyp9UEwylKvzxawwo646ag3QRPIJebhxSmTXoMbi2B+n369hKlig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705686662; a=rsa-sha256; cv=none; b=Zh/hNXZj7s2znzGqOBSnUVTPROoVJsAvfMaHlOUc0l2zJo6pFdvEeUmV81EUL8itTC0Xfi e5QN/P2a1afEOvqSJTAxP69ydhq1MrAXCbndnmSROqe6n1kFYK5tjmZDxgfnfYnb2Gprau Wo9VLeTx8xMSCOMHiAokPPKCtjuUq/5F+9swswp/Rbt1cZQwJJ79vbuVmW55qW7f6C4/3l c/SGRJwIXEoK1BPz9gtq0gC4fmD65ejeuk+YEX8QfNbZnA8EUG1/wj1AQE+m0R3zZIbFkU RGXjsZ9Eib0fxzx5jKXATAI3b2OvwO333hqY/tSFfGRt6FaLGOV85esQgWKyCA== 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 4TGnGY6l57z11Bs; Fri, 19 Jan 2024 17:51:01 +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 40JHp1lK058792; Fri, 19 Jan 2024 17:51:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40JHp1QI058789; Fri, 19 Jan 2024 17:51:01 GMT (envelope-from git) Date: Fri, 19 Jan 2024 17:51:01 GMT Message-Id: <202401191751.40JHp1QI058789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 39f5d8dd1b2f - main - fusefs: fix some memory leaks in the tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 39f5d8dd1b2fea7cff0770efb0bc3d6e33e24279 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=39f5d8dd1b2fea7cff0770efb0bc3d6e33e24279 commit 39f5d8dd1b2fea7cff0770efb0bc3d6e33e24279 Author: Alan Somers AuthorDate: 2024-01-17 21:13:05 +0000 Commit: Alan Somers CommitDate: 2024-01-19 17:44:32 +0000 fusefs: fix some memory leaks in the tests MFC after: 2 weeks --- 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(_, _))