Avoid use scoped block variable
Ranier Vilela <ranier.vf@gmail.com>
From: Ranier Vilela <ranier.vf@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2025-12-09T16:06:35Z
Lists: pgsql-hackers
Attachments
- avoid-use-scoped-block-variable-lockfuncs.patch (application/octet-stream) patch
- avoid-use-scoped-block-variable-rawpage.patch (application/octet-stream) patch
- avoid-use-scoped-block-variable-walsender.patch (application/octet-stream) patch
Hi. I noticed a possible violation of C rules. Some functions rely on local block variables, but this are a mistake. Once that block exits, the memory of the variable is released. Fix by moving the declaration variables. best regards, Ranier Vilela