summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog3
-rw-r--r--plugins/imudp/imudp.c8
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