Fix memory leak in new GUC check_hook

Álvaro Herrera <alvherre@kurilemu.de>

Commit: 661237056b3ad92af40bc674459152d5ea0a58bb
Author: Álvaro Herrera <alvherre@kurilemu.de>
Date: 2026-02-17T15:38:24Z
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.

Files

PathChange+/−
src/backend/utils/error/elog.c modified +4 −3