From nobody Sun Dec 17 22:06:21 2023 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 4StcVP4ZLXz54LTr; Sun, 17 Dec 2023 22:06:21 +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 4StcVP2vx8z4qxF; Sun, 17 Dec 2023 22:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702850781; 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=eNLtMlErPwJCSTYOCh0KY7gpSm8NVROVOj6291UPBCw=; b=F+v06bqGZDRqHU9zrdGj8A7demHNtqHI7bYAY0kGV6JOCA7r6Jn0xmq92zdPH8Ixym6Y23 5Pver2RMB2xl2fz/lW3fbWCGJ7wLKOC+NmX0LHKTYA/AMA1LZJUtdi00o6sFOhAqeV+pHU ZvOaRdgcqZoCykETM1Et58Ce/TXEoyhT+xgLzoAgo8vGBWn0vFDYJD4hXOtaTVmMGyIwOR YrZGj7DriubMxFB+AIzDCLHGQKAogRarhNI1+/7Op3AxuI/HvIaeTXyOUl78wrBeKRcCea 7anpphitXx0KJPT9GKPsNcyE4hh4Lv9WQrErBWbzXmyxOJL8RWBGzYTDVojLrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702850781; a=rsa-sha256; cv=none; b=XfV+KsPpKOFpowdLK5Ut5SNYlt208cxaW17hY41cy+dWQbUEvespyKdknu4bUNWShVxx+8 bMrxLTRrTDTLgo2NaEYOGu+XdmCwaNMBED0i8LjvJkvEvEfaN/IX9wOMIETaJ96Sql9xAm Je6JtZRBZwJkO4UyCStE+8sRSzahG8UbLU5UHb/YNMnikV8iRnIsdrH3CFCRuvuzEJl7vH n0qWKbKI/S86XG2OqAfButcDRq1WBIjODC7FYljLq1zQKys5gUHZrs+rPj0ebLmvknM7ct mmI2QgWvEa1ES3b2Gl3L1QoG4JjzRlSxmx4UsgzTwpabirj4R0eYw06Q7OQXoA== 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=1702850781; 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=eNLtMlErPwJCSTYOCh0KY7gpSm8NVROVOj6291UPBCw=; b=H00jeY0iXAUmpT8qhZMj4HKHWi+/TeYsZBaIMmW5Pie145tWZUmDnDtpWrtoZZfmtF+FJ1 7cOCu9wpO0Mmxvr0MCWWX3r8ffyAzdfqdLMe+jgC5L4x3p6RVRL4+P3ezIpouyOY0GyoT3 EnEnZ3MAiLdz8m6sBIxTChhZXSDOMx8weI/DpufUdH6UrnTGhn2FCQ2yYaMr+OcRqmJ27Y 5olwVhvWQN3zmvYo/pTJ0K7k8YK/X5tUyKN5ir5HnFblG7jaMQhtwzi2Pwki6+EUy4wSu+ aNmVI1UaVGOuZX5Ynjiu5/w61fbBJpKJj6SESoQwmXsXEbUux9+fJcfrA8thpw== 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 4StcVP1wGJzvqD; Sun, 17 Dec 2023 22:06:21 +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 3BHM6LUR062916; Sun, 17 Dec 2023 22:06:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BHM6LDI062913; Sun, 17 Dec 2023 22:06:21 GMT (envelope-from git) Date: Sun, 17 Dec 2023 22:06:21 GMT Message-Id: <202312172206.3BHM6LDI062913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7aa375dcc61e - main - libc: correct some memory leaks in acl_to_text(3) and acl_to_text_np(3) 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7aa375dcc61e48cc56da45c9d5a11371693c8043 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7aa375dcc61e48cc56da45c9d5a11371693c8043 commit 7aa375dcc61e48cc56da45c9d5a11371693c8043 Author: Peter Eriksson AuthorDate: 2023-12-17 22:03:13 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-17 22:06:03 +0000 libc: correct some memory leaks in acl_to_text(3) and acl_to_text_np(3) PR: 275232 MFC after: 1 week --- lib/libc/posix1e/acl_to_text_nfs4.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libc/posix1e/acl_to_text_nfs4.c b/lib/libc/posix1e/acl_to_text_nfs4.c index d901b1cf6b88..157215c9dd52 100644 --- a/lib/libc/posix1e/acl_to_text_nfs4.c +++ b/lib/libc/posix1e/acl_to_text_nfs4.c @@ -72,6 +72,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric) snprintf(str, size, "user:%d", (unsigned int)*id); else snprintf(str, size, "user:%s", pwd->pw_name); + acl_free(id); break; case ACL_GROUP_OBJ: @@ -91,6 +92,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric) snprintf(str, size, "group:%d", (unsigned int)*id); else snprintf(str, size, "group:%s", grp->gr_name); + acl_free(id); break; case ACL_EVERYONE: @@ -157,6 +159,7 @@ format_additional_id(char *str, size_t size, const acl_entry_t entry) if (id == NULL) return (-1); snprintf(str, size, ":%d", (unsigned int)*id); + acl_free(id); } return (0);