Fix memory leak when output postgres_fdw's "Relations"

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Fix memory leak when output postgres_fdw's "Relations"
Date: 2021-07-23 14:22:37
Message-ID: CAEudQAq6GgZuf3c_szDVXm08k-edb0SR7E+ATcs1WzGV=pHFVA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

This is a minor leak, oversight in
https://github.com/postgres/postgres/commit/4526951d564a7eed512b4a0ac3b5893e0a115690#diff-e399f5c029192320f310a79f18c20fb18c8e916fee993237f6f82f05dad851c5

ExplainPropertyText does not save the *relations->data* pointer and
var relations goes out of scope.

No need to backpatch.

regards,
Ranier Vilela

Attachment Content-Type Size
fix_memory_leak_postgres_fdw.patch application/octet-stream 464 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mikhail Matrosov 2021-07-23 14:27:36 Configure with thread sanitizer fails the thread test
Previous Message Robert Haas 2021-07-23 13:25:22 Re: [bug?] Missed parallel safety checks, and wrong parallel safety