summaryrefslogtreecommitdiff
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-03-09 22:20:53 +0100
committerMichael Biebl <biebl@debian.org>2011-03-09 22:20:53 +0100
commita362b3333f84518889cefc1706d4e6adaa92888c (patch)
treec680c3dec25c9b987bcb3ddb2caa34f68fe00944 /runtime/msg.c
parent4f45cc34384973b3643148c21a5ede489ab05f86 (diff)
downloadrsyslog-a362b3333f84518889cefc1706d4e6adaa92888c.tar.gz
Imported Upstream version 5.7.8upstream/5.7.8
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index fb4d574..b0261fa 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -932,13 +932,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) {