Plug minor memleak in pg_dump

From: gkokolatos(at)pm(dot)me
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Plug minor memleak in pg_dump
Date: 2022-02-01 13:36:05
Message-ID: oZwKiUxFsVaetG2xOJp7Hwao8F1AKIdfFDQLNJrnwoaxmjyB-45r_aYmhgXHKLcMI3GT24m9L6HafSi2ns7WFxXe0mw2_tIJpD-Z3vb_eyI=@pm.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v1-0001-Plug-minor-leak-while-reading-Table-of-Contents.patch text/x-patch 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2022-02-01 14:11:03 Re: RFC: Logging plan of the running query
Previous Message Dagfinn Ilmari Mannsåker 2022-02-01 13:15:45 Re: Support tab completion for upper character inputs in psql