From 37d264478ab47e8fa03751c39ba2c5dd447b89c8 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 26 Oct 2022 12:57:40 +0900 Subject: [PATCH] Fix variable assignment thinko in hba.c The intention behind 1b73d0b was to limit the use of TokenizedAuthLine, but I have fat-fingered one location in parse_hba_line() when creating the HbaLine, where this should use the local variable and not the value coming from TokenizedAuthLine. This logic is the exactly the same, but let's be clean about all that on consistency grounds. Reported-by: Julien Rouhaud Discussion: https://postgr.es/m/20221026032730.k3sib5krgm7l6njk@jrouhaud --- src/backend/libpq/hba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 78e83c17c7b..e9fc0af7c9e 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -1079,7 +1079,7 @@ parse_hba_line(TokenizedAuthLine *tok_line, int elevel) HbaLine *parsedline; parsedline = palloc0(sizeof(HbaLine)); - parsedline->sourcefile = pstrdup(tok_line->file_name); + parsedline->sourcefile = pstrdup(file_name); parsedline->linenumber = line_num; parsedline->rawline = pstrdup(tok_line->raw_line); -- 2.39.5