Re: Fix memory leak when output postgres_fdw's "Relations"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix memory leak when output postgres_fdw's "Relations"
Date: 2021-07-23 14:32:34
Message-ID: 866574.1627050754@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> writes:
> This is a minor leak, oversight in
> https://github.com/postgres/postgres/commit/4526951d564a7eed512b4a0ac3b5893e0a115690#diff-e399f5c029192320f310a79f18c20fb18c8e916fee993237f6f82f05dad851c5

I don't think you understand how Postgres memory management works.
There's no permanent leak here, just till the end of the command;
so it's pretty doubtful that there's any need to expend cycles on
an explicit pfree.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2021-07-23 15:05:51 Re: Have I found an interval arithmetic bug?
Previous Message Mikhail Matrosov 2021-07-23 14:27:36 Configure with thread sanitizer fails the thread test