diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2011-08-05 14:14:23 +0200 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2011-08-05 14:14:23 +0200 |
commit | a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3 (patch) | |
tree | 020ab62e213bb3c88f1a977cd1bb0b2af9e9bc18 /runtime/msg.c | |
parent | f285420d1731555eb9eb6717fc9c875651ab7c91 (diff) | |
parent | a3953fbee90045b96bd5ef44b64883a6bff57fee (diff) | |
download | rsyslog-a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3.tar.gz rsyslog-a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3.tar.xz rsyslog-a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3.zip |
Merge branch 'v4-stable' into v4-beta
Conflicts:
ChangeLog
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index c450d6bd..6a01827c 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -2827,7 +2827,13 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, } /* check for "." and ".." (note the parenthesis in the if condition!) */ - if((*pRes == '.') && (*(pRes + 1) == '\0' || (*(pRes + 1) == '.' && *(pRes + 2) == '\0'))) { + if(*pRes == '\0') { + if(*pbMustBeFreed == 1) + free(pRes); + pRes = UCHAR_CONSTANT("_"); + bufLen = 1; + *pbMustBeFreed = 0; + } else if((*pRes == '.') && (*(pRes + 1) == '\0' || (*(pRes + 1) == '.' && *(pRes + 2) == '\0'))) { uchar *pTmp = pRes; if(*(pRes + 1) == '\0') @@ -2837,12 +2843,6 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, if(*pbMustBeFreed == 1) free(pTmp); *pbMustBeFreed = 0; - } else if(*pRes == '\0') { - if(*pbMustBeFreed == 1) - free(pRes); - pRes = UCHAR_CONSTANT("_"); - bufLen = 1; - *pbMustBeFreed = 0; } } |