pgsql: Fix memory leak in new GUC check_hook

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix memory leak in new GUC check_hook
Date: 2026-02-17 15:44:53
Message-ID: E1vsNFs-001IDO-1E@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix memory leak in new GUC check_hook

Commit 38e0190ced71 forgot to pfree() an allocation (freed in other
places of the same function) in only one of several spots in
check_log_min_messages(). Per Coverity. Add that.

While at it, avoid open-coding guc_strdup(). The new coding does a
strlen() that wasn't there before, but I doubt it's measurable.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/661237056b3ad92af40bc674459152d5ea0a58bb

Modified Files
--------------
src/backend/utils/error/elog.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2026-02-17 17:46:26 pgsql: Use a bitmask for ExecInsertIndexTuples options
Previous Message Heikki Linnakangas 2026-02-17 15:22:28 pgsql: Ignore SIGINT in walwriter and walsummarizer