Message ID | 20210511171648.360163-1-siddhesh@sourceware.org |
---|---|
State | Superseded |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A1010388C03D; Tue, 11 May 2021 17:17:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A1010388C03D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620753422; bh=yA8pvl3ziZ8Zy4V9atKhUbFEs91s52pCY6l5u90Vl4c=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=W4ZmVC5WFgT2QKe9VQP7F0EzzhxXl+t9HXkGHVyaNLauzr3G39Scs8TyUnzgPvJfY G5OmKZsayM6JHYcJ9DDoaDBAPRSlOidTir/ExCHXvozU5xYCRXVE1rKF4TgB9yvRRz i+dycIRTB3xoQZfkyOFhXNMoXIzJ30FwfVWSvgHc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from dog.elm.relay.mailchannels.net (dog.elm.relay.mailchannels.net [23.83.212.48]) by sourceware.org (Postfix) with ESMTPS id 0EF7B3865474 for <libc-alpha@sourceware.org>; Tue, 11 May 2021 17:16:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0EF7B3865474 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 2F7345420CD for <libc-alpha@sourceware.org>; Tue, 11 May 2021 17:16:58 +0000 (UTC) Received: from pdx1-sub0-mail-a29.g.dreamhost.com (100-96-133-96.trex.outbound.svc.cluster.local [100.96.133.96]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C0519541AEC for <libc-alpha@sourceware.org>; Tue, 11 May 2021 17:16:57 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a29.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.133.96 (trex/6.2.1); Tue, 11 May 2021 17:16:58 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Average-Trouble: 613aeda50cbc4532_1620753417989_1113167846 X-MC-Loop-Signature: 1620753417989:3866529494 X-MC-Ingress-Time: 1620753417988 Received: from pdx1-sub0-mail-a29.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a29.g.dreamhost.com (Postfix) with ESMTP id 7FB397E4A9 for <libc-alpha@sourceware.org>; Tue, 11 May 2021 10:16:57 -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-a29.g.dreamhost.com (Postfix) with ESMTPSA id 4CADF7E6C3 for <libc-alpha@sourceware.org>; Tue, 11 May 2021 10:16:55 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a29 To: libc-alpha@sourceware.org Subject: [PATCH] charmap_conversion: Free conversion table on exit Date: Tue, 11 May 2021 22:46:48 +0530 Message-Id: <20210511171648.360163-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3492.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Siddhesh Poyarekar via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Siddhesh Poyarekar <siddhesh@sourceware.org> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
charmap_conversion: Free conversion table on exit
|
|
Checks
Context | Check | Description |
---|---|---|
dj/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
Commit Message
Siddhesh Poyarekar
May 11, 2021, 5:16 p.m. UTC
The conversion table is allocated using xcalloc but never freed. --- iconv/iconv_charmap.c | 1 + 1 file changed, 1 insertion(+)
Comments
Ping! I'll push this one too in a couple of days if there are no objections since it is a pretty trivial fix. Siddhesh On 5/11/21 10:46 PM, Siddhesh Poyarekar via Libc-alpha wrote: > The conversion table is allocated using xcalloc but never freed. > --- > iconv/iconv_charmap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c > index f76b3ce2b1..e3d12b04e3 100644 > --- a/iconv/iconv_charmap.c > +++ b/iconv/iconv_charmap.c > @@ -228,6 +228,7 @@ charmap_conversion (const char *from_code, struct charmap_t *from_charmap, > while (++remaining < argc); > > /* All done. */ > + free (cvtbl); > return status; > } > >
On 11/05/2021 14:16, Siddhesh Poyarekar via Libc-alpha wrote: > The conversion table is allocated using xcalloc but never freed. LGTM, although I would wrap it on a free_table since it is allocated on both use_from_charmap and use_both_charmaps with allocate_table. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > --- > iconv/iconv_charmap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c > index f76b3ce2b1..e3d12b04e3 100644 > --- a/iconv/iconv_charmap.c > +++ b/iconv/iconv_charmap.c > @@ -228,6 +228,7 @@ charmap_conversion (const char *from_code, struct charmap_t *from_charmap, > while (++remaining < argc); > > /* All done. */ > + free (cvtbl); > return status; > }
On 5/17/21 10:32 PM, Adhemerval Zanella via Libc-alpha wrote: > > > On 11/05/2021 14:16, Siddhesh Poyarekar via Libc-alpha wrote: >> The conversion table is allocated using xcalloc but never freed. > > LGTM, although I would wrap it on a free_table since it is allocated > on both use_from_charmap and use_both_charmaps with allocate_table. OK, I've made this change. I'll post the committed patch shortly. Thanks, Siddhesh
diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c index f76b3ce2b1..e3d12b04e3 100644 --- a/iconv/iconv_charmap.c +++ b/iconv/iconv_charmap.c @@ -228,6 +228,7 @@ charmap_conversion (const char *from_code, struct charmap_t *from_charmap, while (++remaining < argc); /* All done. */ + free (cvtbl); return status; }