Re: BUG #18338: Memory leak in function 'dumpRule'

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: jora(dot)gevorgyan(at)rau(dot)am, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18338: Memory leak in function 'dumpRule'
Date: 2024-02-12 14:09:38
Message-ID: ed717500-6975-4e57-84ed-6e1fafa60d6e@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-02-12 18:44:32 BUG #18339: Erroneous dependency references of Postgres 15.4 packages when installing 16.2 from GPDG repository
Previous Message Daniel Gustafsson 2024-02-12 14:04:28 Re: BUG #18338: Memory leak in function 'dumpRule'