Avoid handle leak (src/bin/pg_ctl/pg_ctl.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Avoid handle leak (src/bin/pg_ctl/pg_ctl.c)
Date
Msg-id CAEudQApqP-9nvK7ZqU9Kw7vy8fGMhhzMWCqVAMbcKy4PixKSQw@mail.gmail.com
Whole thread Raw
Responses Re: Avoid handle leak (src/bin/pg_ctl/pg_ctl.c)
List pgsql-hackers
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
Attachment

pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: Bug in pg_stat_statements
Next
From: Sami Imseih
Date:
Subject: Re: [Proposal] Adding callback support for custom statistics kinds