Blame SOURCES/rsyslog-8.24.0-rhbz1488186-fixed-nullptr-check.patch

af6c5a
From a5b40bb57cf47d964ad3873ddf550e7885df9f8e Mon Sep 17 00:00:00 2001
af6c5a
From: Marek Tamaskovic <tamaskovic.marek@gmail.com>
af6c5a
Date: Wed, 6 Sep 2017 17:08:45 +0200
af6c5a
Subject: [PATCH] fixed nullptr check
af6c5a
af6c5a
---
af6c5a
 plugins/imjournal/imjournal.c | 4 +++-
af6c5a
 1 file changed, 3 insertions(+), 1 deletion(-)
af6c5a
af6c5a
diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c
af6c5a
index e3e0f39..938e8b8 100644
af6c5a
--- a/plugins/imjournal/imjournal.c
af6c5a
+++ b/plugins/imjournal/imjournal.c
af6c5a
@@ -514,7 +514,9 @@ pollJournal(void)
af6c5a
 			ABORT_FINALIZE(RS_RET_ERR);
af6c5a
 		}
af6c5a
 
af6c5a
-		iRet = loadJournalState();
af6c5a
+		if(cs.stateFile != NULL){
af6c5a
+			iRet = loadJournalState();
af6c5a
+		}
af6c5a
 		LogMsg(0, RS_RET_OK, LOG_NOTICE, "imjournal: journal reloaded...");
af6c5a
 	} else if (jr < 0) {
af6c5a
 		char errStr[256];
af6c5a
-- 
af6c5a
2.9.5
af6c5a