Re: Fix memory leak when output postgres_fdw's "Relations" - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix memory leak when output postgres_fdw's "Relations"
Date
Msg-id 866574.1627050754@sss.pgh.pa.us
Whole thread Raw
In response to Fix memory leak when output postgres_fdw's "Relations"  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: Fix memory leak when output postgres_fdw's "Relations"  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
Ranier Vilela <ranier.vf@gmail.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



pgsql-hackers by date:

Previous
From: Mikhail Matrosov
Date:
Subject: Configure with thread sanitizer fails the thread test
Next
From: Bruce Momjian
Date:
Subject: Re: Have I found an interval arithmetic bug?