Re: Memory leak fix in psql
| От | Tom Lane |
|---|---|
| Тема | Re: Memory leak fix in psql |
| Дата | |
| Msg-id | 1212323.1658248591@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Memory leak fix in psql (Andres Freund <andres@anarazel.de>) |
| Ответы |
Re: Memory leak fix in psql
|
| Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes:
> On 2022-07-19 21:08:53 +0800, Japin Li wrote:
>> + {
>> + termPQExpBuffer(&buf);
>> return false;
>> + }
> Adding copy over copy of this same block doesn't seem great. Can we instead
> add a helper for it or such?
The usual style in these files is something like
if (bad things happened)
goto fail;
...
fail:
termPQExpBuffer(&buf);
return false;
Yeah, it's old school, but please let's not have a few functions that
do it randomly differently from all their neighbors.
regards, tom lane
В списке pgsql-hackers по дате отправления: