dhcp-4.4.1-fix-null-printfs-1.patch 1.06 KB
From 710dfd95149e580c827ddb2d3abe5a12aec45b68 Mon Sep 17 00:00:00 2001
From: Brett Neumeier <brett@neumeier.us>
Date: Tue, 7 May 2019 07:45:32 -0500
Subject: [PATCH] fix null printfs

---
 server/confpars.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/confpars.c b/server/confpars.c
index d2cedfe..623d5dc 100644
--- a/server/confpars.c
+++ b/server/confpars.c
@@ -911,7 +911,7 @@ void parse_failover_peer (cfile, group, type)
 	if (is_identifier (token) || token == STRING) {
 		name = dmalloc (strlen (val) + 1, MDL);
 		if (!name)
-			log_fatal ("no memory for peer name %s", name);
+			log_fatal ("no memory for peer name %s", val);
 		strcpy (name, val);
 	} else {
 		parse_warn (cfile, "expecting failover peer name.");
@@ -1226,7 +1226,7 @@ void parse_failover_state_declaration (struct parse *cfile,
 			name = dmalloc (strlen (val) + 1, MDL);
 			if (!name)
 				log_fatal ("failover peer name %s: no memory",
-					   name);
+					   val);
 			strcpy (name, val);
 		} else {
 			parse_warn (cfile, "expecting failover peer name.");
-- 
2.20.1