From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, PDS_RDNS_DYNAMIC_FP,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_MED, RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3BCAE1F8C6 for ; Tue, 27 Jul 2021 17:43:00 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1588F3839438 for ; Tue, 27 Jul 2021 17:42:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1588F3839438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627407779; bh=XU7XZ6xIHY+i2kK5xByrp6QPZalkXTGjTipU5ZMd7m0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=H22+6r0yw6g+AC6RxSGFduObcmYZ1iebnmwovss8DotK5xku12+5lZTDSU6VUPm8T js4VAU2/l1fhgb93piCn6x2RygGvBgQ3RWIRI+Q2RI1I278D6fwzHrbPDqXtSL5v4i rccQFbktV40HlX/iC/qgNsnz7z6YL0tQYkutKSHQ= Received: from cross.elm.relay.mailchannels.net (cross.elm.relay.mailchannels.net [23.83.212.46]) by sourceware.org (Postfix) with ESMTPS id F1DF9383D80A for ; Tue, 27 Jul 2021 17:41:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F1DF9383D80A X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 394911221C5; Tue, 27 Jul 2021 17:41:42 +0000 (UTC) Received: from pdx1-sub0-mail-a35.g.dreamhost.com (100-96-16-89.trex.outbound.svc.cluster.local [100.96.16.89]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9125A121FF9; Tue, 27 Jul 2021 17:41:41 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a35.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.89 (trex/6.3.3); Tue, 27 Jul 2021 17:41:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Sponge-Trade: 026990352db75a39_1627407701835_78516611 X-MC-Loop-Signature: 1627407701835:1098371732 X-MC-Ingress-Time: 1627407701835 Received: from pdx1-sub0-mail-a35.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTP id 41F1986717; Tue, 27 Jul 2021 10:41:41 -0700 (PDT) Received: from rhbox.redhat.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTPSA id 24A3186716; Tue, 27 Jul 2021 10:41:37 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a35 To: libc-alpha@sourceware.org Subject: [PATCH 0/5] Static analysis fixes Date: Tue, 27 Jul 2021 23:11:24 +0530 Message-Id: <20210727174129.3612656-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Siddhesh Poyarekar via Libc-alpha Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" These are some issues identified through static analysis. The gaiconf_init implementation is quite ugly and needs a refactor, but the patch 5/5 is a minimal fix to ensure that a double-free is avoided. Siddhesh Poyarekar (5): ldconfig: avoid leak on empty paths in config file gconv_parseconfdir: Fix memory leak iconv_charmap: Close output file when done copy_and_spawn_sgid: Avoid double calls to close() gaiconf_init: Avoid double-free in label and precedence lists elf/ldconfig.c | 6 +++++- iconv/gconv_parseconfdir.h | 9 ++++----- iconv/iconv_charmap.c | 2 ++ support/support_capture_subprocess.c | 1 + sysdeps/posix/getaddrinfo.c | 2 ++ 5 files changed, 14 insertions(+), 6 deletions(-) --=20 2.31.1