Re: pg_dump memory leak of 400 bytes - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: pg_dump memory leak of 400 bytes
Date
Msg-id 4840A74B-49BD-44C3-91E6-20DAE5A84BB8@yesql.se
Whole thread Raw
List pgsql-hackers
> On 11 Dec 2024, at 10:59, Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru> wrote:

> When I was looking through static analyzer output I've found a memory leak in pg_dump

Thanks for the report, although 400 bytes won't break the bank in the grand
scheme of things considering how much memory pg_dump use there is little point
in not freeing it.

> Patches for both variants are attached. I also propose changing palloc to pg_malloc
> since it is the only place in pg_dump where palloc is used instead of pg_malloc

Freeing it when not needed anymore seems appropriate, I'll go make that happen.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: Memory leak in pg_logical_slot_{get,peek}_changes
Next
From: Tomas Vondra
Date:
Subject: Re: advanced patch feedback session at FOSDEM, responses needed