pgsql: Fix some memory leaks and improve restricted token handling on W

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix some memory leaks and improve restricted token handling on W
Date: 2020-01-27 02:03:11
Message-ID: E1ivtk7-0007jQ-U6@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix some memory leaks and improve restricted token handling on Windows

The leaks have been detected by a Coverity run on Windows. No backpatch
is done as the leaks are minor.

While on it, make restricted token creation more consistent in its error
handling by logging an error instead of a warning if missing
advapi32.dll, which was missing in the NT4 days. Any modern platform
should have this DLL around. Now, if the library is not there, an error
is still reported back to the caller, and nothing is done do there is no
behavior change done in this commit.

Author: Ranier Vilela
Discussion: https://postgr.es/m/CAEudQApa9MG0foPkgPX87fipk=vhnF2Xfg+CfUyR08h4R7Mywg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/10a525230fb18331dbcfd6a4a7248d76f55c331c

Modified Files
--------------
src/backend/libpq/auth.c | 14 ++++++++++++++
src/backend/postmaster/postmaster.c | 6 ++++++
src/common/restricted_token.c | 34 ++++++++++++++++++++++------------
3 files changed, 42 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2020-01-27 02:07:58 pgsql: Avoid unnecessary shm writes in Parallel Hash Join.
Previous Message Tom Lane 2020-01-26 21:32:30 pgsql: Fix EXPLAIN (SETTINGS) to follow policy about when to print empt