Blob Blame History Raw
From d989a9a24c5749c9e30ed33a5443cd659f56109e Mon Sep 17 00:00:00 2001
From: Tomas Heinrich <theinric@redhat.com>
Date: Wed, 22 Apr 2015 14:13:34 +0200
Subject: [PATCH] imuxsock: fix a crash when setting a hostname

Setting a hostname via the legacy directive would lead to a crash
during shutdown caused by a double-free.
---
 plugins/imuxsock/imuxsock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index eca9a34..90fc49e 100644
--- a/plugins/imuxsock/imuxsock.c
+++ b/plugins/imuxsock/imuxsock.c
@@ -350,8 +350,7 @@ static rsRetVal addInstance(void __attribute__((unused)) *pVal, uchar *pNewVal)
 	inst->bParseTrusted = cs.bParseTrusted;
 	inst->next = NULL;
 
-	/* some legacy conf processing */
-	free(cs.pLogHostName); /* reset hostname for next socket */
+	/* reset hostname for next socket */
 	cs.pLogHostName = NULL;
 
 finalize_it:
-- 
1.9.3