Re: [PATCH] ecpg: fix progname memory leak

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Maksim Kita <kitaetoya(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] ecpg: fix progname memory leak
Date: 2020-10-08 16:27:11
Message-ID: 20201008162711.GB13054@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 8, 2020 at 10:35:41AM +0900, Michael Paquier wrote:
> On Wed, Oct 07, 2020 at 02:31:54PM +0300, Maksim Kita wrote:
> > Fix progname memory leak in ecpg client.
> > Issue taken from todo list https://wiki.postgresql.org/wiki/Todo.
>
> FWIW, I don't see much point in doing that. For one, we have a
> more-or-less established rule that progname remains set until the
> application leaves, and there are much more places where we leak
> memory like that. As one example, just see the various places where
> we use pg_strdup for option parsing. At the end, it does not really
> matter as these are applications running for a short amount of time.

Agreed, but what does the TODO item mean then?

Fix small memory leaks in ecpg
Memory leaks in a short running application like ecpg are not really
a problem, but make debugging more complicated

Should it be removed?

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2020-10-08 16:42:28 Re: Probably typo in multixact.c
Previous Message Bruce Momjian 2020-10-08 16:23:10 Re: Wrong example in the bloom documentation