diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-22 15:47:58 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-09-22 15:47:58 +0200 |
commit | 571c51fe3481192febdf40343a21a60c69498aab (patch) | |
tree | 3158a905124c935fbbb6970e61ddb5dd525a4bd3 /plugins | |
parent | 65527ca62585793f3b85f8c17a11621e6f7ad189 (diff) | |
download | rsyslog-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')
-rw-r--r-- | plugins/imudp/imudp.c | 8 |
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 |