File 0010-fix-regression-from-imfile-fixes-never-released-code.patch of Package rsyslog.6132

From f3983df1d92d6b39f12d35ea9223cf46149a0118 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards <rgerhards@adiscon.com>
Date: Wed, 25 Mar 2015 10:42:50 +0100
Subject: [PATCH] fix regression from imfile fixes - never released code

---
 runtime/stream.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/runtime/stream.c b/runtime/stream.c
index 33bfd31..cb4e37e 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -1862,8 +1862,10 @@ static rsRetVal strmSerialize(strm_t *pThis, strm_t *pStrm)
 	l = pThis->inode;
 	objSerializeSCALAR_VAR(pStrm, inode, INT64, l);
 
-	cstrFinalize(pThis->prevLineSegment);
-	objSerializePTR(pStrm, prevLineSegment, CSTR);
+	if(pThis->prevLineSegment != NULL) {
+		cstrFinalize(pThis->prevLineSegment);
+		objSerializePTR(pStrm, prevLineSegment, CSTR);
+	}
 
 	i = pThis->bPrevWasNL;
 	objSerializeSCALAR_VAR(pStrm, bPrevWasNL, INT, i);
-- 
2.6.6

openSUSE Build Service is sponsored by