From nobody Wed Dec 20 08:30:23 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 4Sw6FX2wDQz54cT1; Wed, 20 Dec 2023 08:30:24 +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 4Sw6FX16WTz4LvN; Wed, 20 Dec 2023 08:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703061024; 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=FfVNasyP9dbVtYqNJYKPCUZEYOSYFKqWlJt2JHLmofo=; b=oRao8jOHkIYRjJWyaMHUn6E99AuIRhCgNfXuAPPIoH4/pecqaDuii0BZOH0eWtDwd2QZ50 vxNbfDScPL1n7RV+z6FQ9n7H/7X0oZiXz3rBhRi68H2Asiemk5+WkoxMqaJG1PitwXNSz9 JXUtsokUJYgemhVEhHqCxksk9WTE4undfxGuk7INOMkuNWjEw0496uxDsxv8qOjy7ArdwG R3g8xyq/hIM9+4FWmbc07BVEScL2KfryUJ+QAPwgEN6sXlh7foeYMGy3TB+k8cv3DK3ECV 3P7dc4ArOcKOGEg5wMN96Jv0CGilaSVqwy3aE3YkbaLAdjMETspViaBRB0xRZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703061024; a=rsa-sha256; cv=none; b=RprO9ffAGrIIp/A2iBbz11H+9dAVzimeI0qzD1LAi25xxlzZIBmKFGa+8FFFajKSyoMHFf +waPdFcQeDJ+LJvtm10niqJnKJpTKef4/+/XhT1shYFuOwmZOA1rjvayc2m2YSA4/W0Qzb 2EWUQNfBr9NSVp3hrUcyFW+DUMDj+SPggID66ZKDMhGMDmsinWgLTYcyrESSWiYQoEqu3R 8DAxzDh2kOW5L6G0xE8nIsnqamn74BqoPdsSUHNtmMxbrszDFqRNzJlVkJh6y+/rAkJwPj nqBAfYyuQYKSu4jjhH35spjXoSgAXM9iTI9dnuha8+68G7gtPbP3Scb5tR5c5A== 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=1703061024; 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=FfVNasyP9dbVtYqNJYKPCUZEYOSYFKqWlJt2JHLmofo=; b=mteKtoijbSxHCxwbr8fvVMHUmoYK+olDDuH/rmMMCG4WP9zUNcXiFjuK8TLG166oKewbSH CnOAw75DfiIop5e/Z8yuCh7mWGZV5+vVAN1O4ysS40kIdkXnFu/2rMnE+BoyEI4Y11ItOT ZZKvjrJz4NpNO1ftha5Zqm5kUyMlhtTAPjUQLs4QFMBuoxtTUpDGm+RtWwfiHRQK6+8vFO QtxMiqP6IB9G3TKFFehOD9K3NYJ6ZivhuAosJaFd/P36oQeHScjVVhMDeaoPG0736kXxQN 4bZbxGNApcBnbbq9yrK95DCh84yGkfpb0U88MQn5f+kKrkjv33zYyUGXtXVB7g== 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 4Sw6FX03F3zh66; Wed, 20 Dec 2023 08:30:24 +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 3BK8UNiM033585; Wed, 20 Dec 2023 08:30:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BK8UNSM033582; Wed, 20 Dec 2023 08:30:23 GMT (envelope-from git) Date: Wed, 20 Dec 2023 08:30:23 GMT Message-Id: <202312200830.3BK8UNSM033582@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: e373880312fb - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: e373880312fb8ea09c501975e1fd23234a0df1e3 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e373880312fb8ea09c501975e1fd23234a0df1e3 commit e373880312fb8ea09c501975e1fd23234a0df1e3 Author: Peter Eriksson AuthorDate: 2023-12-17 22:03:13 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-20 08:29:55 +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 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);