pgsql: Create memory context for tokenization after opening top-level f - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Create memory context for tokenization after opening top-level f
Date
Msg-id E1oy12M-000ZEt-Uw@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Create memory context for tokenization after opening top-level file in hba.c

The memory context was created before attempting to open the first HBA
or ident file, which would cause it to leak.  This had no consequences
for the system views for HBA and ident files, but this would cause
memory leaks in the postmaster on reload if the initial HBA and/or ident
files are missing, which is a valid behavior while the backend is
running.

Oversight in efc9816.

Author: Ted Yu
Discussion: https://postgr.es/m/CALte62xH6ivgiKKzPRJgfekPZC6FKLB3xbnf3=tZmc_gKj78dw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d46ad72f464beafa6d92d60d214412374559e280

Modified Files
--------------
src/backend/libpq/hba.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Expand AclMode to 64 bits
Next
From: David Rowley
Date:
Subject: pgsql: Speedup hash index builds by skipping needless binary searches