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. --- plugins/imudp/imudp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins/imudp') 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