Avoid handle leak (src/bin/pg_ctl/pg_ctl.c)
Ranier Vilela <ranier.vf@gmail.com>
From: Ranier Vilela <ranier.vf@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-24T00:51:14Z
Lists: pgsql-hackers
Attachments
- avoid-leak-handle-pg_ctl.patch (application/octet-stream) patch
Hi. Per Coverity. The function *CreateRestrictedProcess* is responsible to create a restricted token Coverity complains that the handle origToken can be leaked. In case of failure of the functions *AllocateAndInitializeSid* or *GetPrivilegesToDelete* the handle origToken must be released. Trivial patch attached. best regards, Ranier Vilela