From: | Anton Voloshin <a(dot)voloshin(at)postgrespro(dot)ru> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | possible repalloc() in icu_convert_case() |
Date: | 2021-04-04 15:34:47 |
Message-ID: | f21e4ba9-8db8-91bf-067a-fcacb429ac55@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello,
in src/backend/utils/adt/formatting.c, in icu_convert_case() I see:
if (status == U_BUFFER_OVERFLOW_ERROR)
{
/* try again with adjusted length */
pfree(*buff_dest);
*buff_dest = palloc(len_dest * sizeof(**buff_dest));
...
Is there any reason why this should not be repalloc()?
In case it should be, I've attached a corresponding patch.
--
Anton Voloshin
Postgres Professional: https://www.postgrespro.com
Russian Postgres Company
Attachment | Content-Type | Size |
---|---|---|
repalloc-in-adt-formatting.patch | text/plain | 721 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Zhihong Yu | 2021-04-04 15:47:43 | Re: Unused variable found in AttrDefaultFetch |
Previous Message | Andrew Dunstan | 2021-04-04 15:21:59 | Re: ALTER TABLE ADD COLUMN fast default |