Re: BUG #18338: Memory leak in function 'dumpRule' - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: BUG #18338: Memory leak in function 'dumpRule'
Date
Msg-id ed717500-6975-4e57-84ed-6e1fafa60d6e@iki.fi
Whole thread Raw
In response to BUG #18338: Memory leak in function 'dumpRule'  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On 12/02/2024 15:36, PG Bug reporting form wrote:
> The memory leak is found by a static analyzer developed at [CAST](
> https://www.linkedin.com/company/cast-center/).
> 
> The memory alocated at [in qtabname]() is getting lost when function
> [pg_fatal is
>
called](https://github.com/postgres/postgres/blob/09eb633e1baa3b7cd7929f3cc77f9c46f63c20b1/src/bin/pg_dump/pg_dump.c#L18007)

No. pg_fatal() calls exit(1). It's not a leak when you exit the process; 
that will certainly release the memory.

There are hundreds of pg_fatal() calls in pg_dump, so I wonder why the 
tool picked on that one in particular. But it's not a bug.

-- 
Heikki Linnakangas
Neon (https://neon.tech)




pgsql-bugs by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: BUG #18338: Memory leak in function 'dumpRule'
Next
From: PG Bug reporting form
Date:
Subject: BUG #18339: Erroneous dependency references of Postgres 15.4 packages when installing 16.2 from GPDG repository