public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: [email protected]
Subject: pgsql: Fix memory leak in new GUC check_hook
Date: Tue, 17 Feb 2026 15:44:53 +0000
Message-ID: <[email protected]> (raw)

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(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Fix memory leak in new GUC check_hook
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox