diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-02 14:10:08 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-02 14:10:08 +0100 |
commit | 8083bd1433449fd2b1b79bf759f782e0f64c0cd2 (patch) | |
tree | da244a6c3681ff7543c09064be79a3c1c1d098c5 | |
parent | 7a75a305acd47c236e3eb006936b480034208a6c (diff) | |
download | rsyslog-8083bd1433449fd2b1b79bf759f782e0f64c0cd2.tar.gz rsyslog-8083bd1433449fd2b1b79bf759f782e0f64c0cd2.tar.xz rsyslog-8083bd1433449fd2b1b79bf759f782e0f64c0cd2.zip |
backporting abort condition fix from 5.7.7
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | runtime/msg.c | 3 |
2 files changed, 10 insertions, 2 deletions
@@ -1,5 +1,12 @@ --------------------------------------------------------------------------- -Version 5.6.4 [V5-STABLE] (rgerhards), 2011-02-?? +Version 5.6.4 [V5-STABLE] (rgerhards), 2011-03-03 +- bugfix: potential abort condition when $RepeatedMsgReduction set to on + as well as potentially in a number of other places where MsgDup() was + used. This only happened when the imudp input module was used and it + depended on name resolution not yet had taken place. In other words, + this was a strange problem that could lead to hard to diagnose + instability. So if you experience instability, chances are good that + this fix will help. - bugfix: fixed a memory leak and potential abort condition this could happen if multiple rulesets were used and some output batches contained messages belonging to more than one ruleset. diff --git a/runtime/msg.c b/runtime/msg.c index e8be79db..409515ae 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -922,13 +922,14 @@ msg_t* MsgDup(msg_t* pOld) pNew->iLenMSG = pOld->iLenMSG; pNew->iLenTAG = pOld->iLenTAG; pNew->iLenHOSTNAME = pOld->iLenHOSTNAME; - if((pOld->msgFlags & NEEDS_DNSRESOL) == 1) { + if((pOld->msgFlags & NEEDS_DNSRESOL)) { localRet = msgSetFromSockinfo(pNew, pOld->rcvFrom.pfrominet); if(localRet != RS_RET_OK) { /* if something fails, we accept loss of this property, it is * better than losing the whole message. */ pNew->msgFlags &= ~NEEDS_DNSRESOL; + pNew->rcvFrom.pRcvFrom = NULL; /* make sure no dangling values */ } } else { if(pOld->rcvFrom.pRcvFrom != NULL) { |