pg_dump: fix memory leak

From: m(dot)korotkov(at)postgrespro(dot)ru
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_dump: fix memory leak
Date: 2025-08-28 14:14:59
Message-ID: 8b73c4804ee5b8f1cf4fed16635e2d1b@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,
I have found a potential memory leak in src/bin/pg_dump/dumputils.c in
the function generate_restrict_key().
Memory is allocated to the ret pointer if pg_strong_random returns
false, and this leads to a memory leak.
I have replaced the allocation to avoid this leak.
---
Best regards, Korotkov Maksim
PostgresPro
m(dot)korotkov(at)postgrespro(dot)ru

Attachment Content-Type Size
0001-pg_dump-fix-memory-allocation.patch text/x-diff 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-08-28 15:28:54 Re: Improve LWLock tranche name visibility across backends
Previous Message Yugo Nagata 2025-08-28 14:10:01 Re: Inconsistent update in the MERGE command