* [PATCH] charmap_conversion: Free conversion table on exit
@ 2021-05-11 17:16 Siddhesh Poyarekar
2021-05-17 15:59 ` [PING][PATCH] " Siddhesh Poyarekar
2021-05-17 17:02 ` [PATCH] " Adhemerval Zanella
0 siblings, 2 replies; 4+ messages in thread
From: Siddhesh Poyarekar @ 2021-05-11 17:16 UTC (permalink / raw)
To: libc-alpha
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;
}
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PING][PATCH] charmap_conversion: Free conversion table on exit
2021-05-11 17:16 [PATCH] charmap_conversion: Free conversion table on exit Siddhesh Poyarekar
@ 2021-05-17 15:59 ` Siddhesh Poyarekar
2021-05-17 17:02 ` [PATCH] " Adhemerval Zanella
1 sibling, 0 replies; 4+ messages in thread
From: Siddhesh Poyarekar @ 2021-05-17 15:59 UTC (permalink / raw)
To: libc-alpha
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;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] charmap_conversion: Free conversion table on exit
2021-05-11 17:16 [PATCH] charmap_conversion: Free conversion table on exit Siddhesh Poyarekar
2021-05-17 15:59 ` [PING][PATCH] " Siddhesh Poyarekar
@ 2021-05-17 17:02 ` Adhemerval Zanella
2021-05-18 3:55 ` Siddhesh Poyarekar
1 sibling, 1 reply; 4+ messages in thread
From: Adhemerval Zanella @ 2021-05-17 17:02 UTC (permalink / raw)
To: Siddhesh Poyarekar, libc-alpha
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;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] charmap_conversion: Free conversion table on exit
2021-05-17 17:02 ` [PATCH] " Adhemerval Zanella
@ 2021-05-18 3:55 ` Siddhesh Poyarekar
0 siblings, 0 replies; 4+ messages in thread
From: Siddhesh Poyarekar @ 2021-05-18 3:55 UTC (permalink / raw)
To: Adhemerval Zanella, libc-alpha
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-18 3:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 17:16 [PATCH] charmap_conversion: Free conversion table on exit Siddhesh Poyarekar
2021-05-17 15:59 ` [PING][PATCH] " Siddhesh Poyarekar
2021-05-17 17:02 ` [PATCH] " Adhemerval Zanella
2021-05-18 3:55 ` Siddhesh Poyarekar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).