v1-0001-Fix-userDoption-not-getting-freed-in-postmaster.patch

text/plain

Filename: v1-0001-Fix-userDoption-not-getting-freed-in-postmaster.patch
Type: text/plain
Part: 0
Message: Fix memory leak in postmasterMain

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v1-0001
Subject: Fix userDoption not getting freed in postmaster
File+
src/backend/postmaster/postmaster.c 2 0
From 78a88ba10f8f6aea2b4ccf831ab6775bae68603c Mon Sep 17 00:00:00 2001
From: Henrik TJ <henrik@0x48.dk>
Date: Wed, 18 Feb 2026 15:28:52 +0100
Subject: [PATCH] Fix userDoption not getting freed in postmaster

---
 src/backend/postmaster/postmaster.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 3fac46c402b..7480c28f08e 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -784,6 +784,8 @@ PostmasterMain(int argc, char *argv[])
 	 */
 	if (!SelectConfigFiles(userDoption, progname))
 		ExitPostmaster(2);
+	if (userDoption != NULL)
+		free(userDoption);
 
 	if (output_config_variable != NULL)
 	{
-- 
2.53.0