summaryrefslogtreecommitdiffstats
path: root/plugins/imudp
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-09-22 15:47:58 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-09-22 15:47:58 +0200
commit571c51fe3481192febdf40343a21a60c69498aab (patch)
tree3158a905124c935fbbb6970e61ddb5dd525a4bd3 /plugins/imudp
parent65527ca62585793f3b85f8c17a11621e6f7ad189 (diff)
downloadrsyslog-571c51fe3481192febdf40343a21a60c69498aab.tar.gz
rsyslog-571c51fe3481192febdf40343a21a60c69498aab.tar.xz
rsyslog-571c51fe3481192febdf40343a21a60c69498aab.zip
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.
Diffstat (limited to 'plugins/imudp')
-rw-r--r--plugins/imudp/imudp.c8
1 files changed, 6 insertions, 2 deletions
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