summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2011-08-05 14:14:23 +0200
committerAndre Lorbach <alorbach@adiscon.com>2011-08-05 14:14:23 +0200
commita8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3 (patch)
tree020ab62e213bb3c88f1a977cd1bb0b2af9e9bc18 /runtime
parentf285420d1731555eb9eb6717fc9c875651ab7c91 (diff)
parenta3953fbee90045b96bd5ef44b64883a6bff57fee (diff)
downloadrsyslog-a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3.tar.gz
rsyslog-a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3.tar.xz
rsyslog-a8f2fd6eb4acf7484a6de53f2175c24a2d4b4cc3.zip
Merge branch 'v4-stable' into v4-beta
Conflicts: ChangeLog
Diffstat (limited to 'runtime')
-rw-r--r--runtime/msg.c14
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;
}
}