From 571c51fe3481192febdf40343a21a60c69498aab Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 22 Sep 2008 15:47:58 +0200 Subject: bugfix: imudp input module could cause segfault on HUP It did not properly de-init a variable acting as a linked list head. That resulted in trying to access freed memory blocks after the HUP. --- ChangeLog | 3 +++ plugins/imudp/imudp.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c840dad..e33802ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ --------------------------------------------------------------------------- Version 3.18.5 (rgerhards), 2008-10-?? +- bugfix: imudp input module could cause segfault on HUP + It did not properly de-init a variable acting as a linked list head. + That resulted in trying to access freed memory blocks after the HUP. --------------------------------------------------------------------------- Version 3.18.4 (rgerhards), 2008-09-18 - bugfix: order-of magnitude issue with base-10 size definitions diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index cda794c3..81e7d7a4 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -242,10 +242,14 @@ CODESTARTafterRun net.clearAllowedSenders (net.pAllowedSenders_UDP); net.pAllowedSenders_UDP = NULL; } - if(udpLstnSocks != NULL) + if(udpLstnSocks != NULL) { net.closeUDPListenSockets(udpLstnSocks); - if(pRcvBuf != NULL) + udpLstnSocks = NULL; + } + if(pRcvBuf != NULL) { free(pRcvBuf); + pRcvBuf = NULL; + } ENDafterRun -- cgit v1.2.3