From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B5DBE15800F for ; Wed, 22 Feb 2023 20:06:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 06EFEE07C5; Wed, 22 Feb 2023 20:06:10 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E2D5DE07C5 for ; Wed, 22 Feb 2023 20:06:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 35644335D55 for ; Wed, 22 Feb 2023 20:06:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CBA558AE for ; Wed, 22 Feb 2023 20:06:07 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1675758702.60b48bf693d25a5a7b09199f9756310b5d7209bf.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: main.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 60b48bf693d25a5a7b09199f9756310b5d7209bf X-VCS-Branch: master Date: Wed, 22 Feb 2023 20:06:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 68701b8b-0d75-4eb8-93bd-df8e53b04305 X-Archives-Hash: 6a155b92dc97177f9781dc3221087758 commit: 60b48bf693d25a5a7b09199f9756310b5d7209bf Author: Fabian Groffen gentoo org> AuthorDate: Tue Feb 7 08:31:42 2023 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Tue Feb 7 08:31:42 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=60b48bf6 main: workaround hypothetical resource leak Signed-off-by: Fabian Groffen gentoo.org> main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 884d6da..b22d6f4 100644 --- a/main.c +++ b/main.c @@ -584,12 +584,12 @@ read_portage_file(const char *file, enum portage_file_type type, void *data) void *e; snprintf(npath, sizeof(npath), "%s:%zu:%zu-%zu", file, line, cbeg, cend); - p = xstrdup(npath); /* if not necessary, but do it for static code analysers * which take into accound that add_set_value might * allocate a new set when masks would be NULL -- a case * which would never happen */ if (masks != NULL) { + p = xstrdup(npath); add_set_value(buf, p, &e, masks); if (e != NULL) free(p);