pgsql: Fix memory leak in new GUC check_hook - Mailing list pgsql-committers

From Álvaro Herrera
Subject pgsql: Fix memory leak in new GUC check_hook
Date
Msg-id E1vsNFs-001IDO-1E@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Ignore SIGINT in walwriter and walsummarizer
Next
From: Álvaro Herrera
Date:
Subject: pgsql: Use a bitmask for ExecInsertIndexTuples options