Plug minor memleak in pg_dump

gkokolatos@pm.me

From: gkokolatos@pm.me
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-01T13:36:05Z
Lists: pgsql-hackers

Attachments

Hi,

I noticed a minor memleak in pg_dump. ReadStr() returns a malloc'ed pointer which
should then be freed. While reading the Table of Contents, it was called as an argument
within a function call, leading to a memleak.

Please accept the attached as a proposed fix.

Cheers,

//Georgios

Commits

  1. Free temporary memory when reading TOC