Blame SOURCES/bz1693706-fix-smtp-alerts-segfault.patch

df66e1
From fdb1739356f723a4e9e4f8b52c37d193a3a5c6e3 Mon Sep 17 00:00:00 2001
df66e1
From: Quentin Armitage <quentin@armitage.org.uk>
df66e1
Date: Tue, 27 Nov 2018 10:57:37 +0000
df66e1
Subject: [PATCH] Fix segfault when smtp alerts configured
df66e1
df66e1
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
df66e1
---
df66e1
 keepalived/core/global_data.c | 2 +-
df66e1
 1 file changed, 1 insertion(+), 1 deletion(-)
df66e1
df66e1
diff --git a/keepalived/core/global_data.c b/keepalived/core/global_data.c
df66e1
index 6e872dcf..cd381d9b 100644
df66e1
--- a/keepalived/core/global_data.c
df66e1
+++ b/keepalived/core/global_data.c
df66e1
@@ -253,7 +253,7 @@ init_global_data(data_t * data, data_t *old_global_data)
df66e1
 		if (!data->smtp_connection_to)
df66e1
 			set_default_smtp_connection_timeout(data);
df66e1
 
df66e1
-		if (strcmp(data->local_name, unknown_name)) {
df66e1
+		if (data->local_name && strcmp(data->local_name, unknown_name)) {
df66e1
 			if (!data->email_from)
df66e1
 				set_default_email_from(data, data->local_name);
df66e1
 
df66e1
-- 
df66e1
2.20.1
df66e1