Re: Memory leak fix in psql

From: Japin Li <japinli(at)hotmail(dot)com>
To: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Mark Dilger" <mark(dot)dilger(at)enterprisedb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Memory leak fix in psql
Date: 2022-07-20 08:13:11
Message-ID: MEYP282MB166974D3883A1A6E25B5FDAEB68E9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Wed, 20 Jul 2022 at 14:21, tanghy(dot)fnst(at)fujitsu(dot)com <tanghy(dot)fnst(at)fujitsu(dot)com> wrote:
> On Wednesday, July 20, 2022 12:52 PM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> What about the argument of upthread where we could use a goto in
>> functions where there are multiple pattern validation checks? Per se
>> v4 attached.
>
> Thanks for your kindly remind and modification.
> I checked v4 patch, it looks good but I think there can be some minor improvement.
> So I deleted some redundant braces around "goto error_return; ".
> Also added an error handle section in validateSQLNamePattern.
>
> Kindly to have a check at the attached v5 patch.
>
> Regards,
> Tang

Thanks for updating the patch. It looks good. However, it cannot be
applied on 14 stable. The attached patches are for 10-14.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

Attachment Content-Type Size
v5-0001-fix-the-memory-leak-in-psql-describe.patch text/x-patch 18.7 KB
pg14-v5-0001-fix-the-memory-leak-in-psql-describe.patch text/x-patch 19.0 KB
pg10-11-12-v5-0001-fix-the-memory-leak-in-psql-describe.patch text/x-patch 976 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Juan José Santamaría Flecha 2022-07-20 08:34:38 Re: Windows default locale vs initdb
Previous Message Etsuro Fujita 2022-07-20 08:10:43 Re: Fast COPY FROM based on batch insert