From nobody Thu Dec 21 15:21:13 2023 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 4SwvK52l1Tz54vQb; Thu, 21 Dec 2023 15:21:13 +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 4SwvK51pZXz3DLZ; Thu, 21 Dec 2023 15:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703172073; 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=vKxe7+TOdjNrAmGWaogYo/f6dPAiU9HKXRvZERdeiz8=; b=HujLgkCNHHuxxjK6oHxLR/RFyoFqV23uVYMvVvKtdBYg5SkZPZ2YLwmaI4FhBTKkh/8ivr tSglZhvkc4Lzi2ccCiA8977Uh+nGUSYYZdYCW5ot911X/SGaewBOaczlX7yCVnAZcEbofQ szz7gud8hPmIKgPsEwPd2yrWjNsgSKriU8xEjtt0MO3dlTMkHGJRaXBE7d6TPGpDOKtX/R sUT4MqJfHRCaCZiPQU4yGS5QhVvSebz1Xd2vO25cLbqV6YB+8ZUZVnspm8cUMABd/mE5tV khvQmdlbbBjEmhv2vt/kEgsgANOFkOotTtJ/8DgtjG1S4lhxuoVJ6u1ba0HURA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703172073; a=rsa-sha256; cv=none; b=Upwa8nbIx5CuBOJjOmJXM2AxLUYma16fLFz/ablcLUvQIPG2ag7+UylTSEYJiwGa9r608v Wxj6h7frDYR8UcDi2SeJjMRnFSZCdGXCwnrqi79nx6Cbv48ZNusS1jrTGRXuue3CrNb2gO IPgMLZYUzpNc3ofZuQ+aNq6nvD6bOFXhmKvv/46GH6f1hn5Qo2SSpA6P2FIYZAV2mGk34m qojdVmxFaCQoxX1GB6P/2Q8lhKhpZLDFUP3tJEDTV4bkFCWDCRbw30wgKf0h3ttVvb4Zcn liFiCjirhDM55buCqxP8JI1IY+M5mc6BSpnNOXXm2qnq5jKPaX6RBbGvNnvi2w== 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=1703172073; 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=vKxe7+TOdjNrAmGWaogYo/f6dPAiU9HKXRvZERdeiz8=; b=LxTvdqgopy1+BEG0dvylsllH5azgrzKkJ59tO5sFIpsrhhJigN5bpECXfkGHUOBDFW57uu gyBHJdFafRFGi8Pw43rqtH4qR0oVCMtFmaGW/LnHB2RvieeQfm0oyT3Rr6rxho6YTLbE54 NtQ15Qtyy1tCdmvNIjlfh/jyS/p9+/UeflUq3Yg1lWXABl+5REJdYdHc5WaaLNFEAnxX0e 4xqRdCtYHb3pQbOWipzVniBrhoB3MgsrXgVtVjPX89G+TYZeUpWhFPQXLqFA+SbMbgcEoX DHwGRtWuP5o+1xl5AhfJ3XXrEZ0uiK2M6bTfE//rrsVg1BCxcmIx/j4Ck9SaUw== 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 4SwvK50vbLzdCs; Thu, 21 Dec 2023 15:21:13 +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 3BLFLDVX043359; Thu, 21 Dec 2023 15:21:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BLFLDS7043356; Thu, 21 Dec 2023 15:21:13 GMT (envelope-from git) Date: Thu, 21 Dec 2023 15:21:13 GMT Message-Id: <202312211521.3BLFLDS7043356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 98693e7a99c4 - stable/13 - libc: correct some memory leaks in acl_to_text(3) and acl_to_text_np(3) 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 98693e7a99c489e7f095c3600c974b0f61a060f1 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=98693e7a99c489e7f095c3600c974b0f61a060f1 commit 98693e7a99c489e7f095c3600c974b0f61a060f1 Author: Peter Eriksson AuthorDate: 2023-12-17 22:03:13 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-21 15:20:39 +0000 libc: correct some memory leaks in acl_to_text(3) and acl_to_text_np(3) PR: 275232 (cherry picked from commit 7aa375dcc61e48cc56da45c9d5a11371693c8043) --- 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 522ebe3d4373..8a4783736aa6 100644 --- a/lib/libc/posix1e/acl_to_text_nfs4.c +++ b/lib/libc/posix1e/acl_to_text_nfs4.c @@ -73,6 +73,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: @@ -92,6 +93,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: @@ -158,6 +160,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);