summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-08-21 15:13:47 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-08-21 15:13:47 +0200
commitcdb58f8d913dc47b01f61f5a72a83ce6aea26623 (patch)
treecfb3299e784bd2dc27473a793809f67d330d2fd7 /runtime
parentc440ae1d15d78a41477a408688c838a36b6d483f (diff)
downloadrsyslog-cdb58f8d913dc47b01f61f5a72a83ce6aea26623.tar.gz
rsyslog-cdb58f8d913dc47b01f61f5a72a83ce6aea26623.tar.xz
rsyslog-cdb58f8d913dc47b01f61f5a72a83ce6aea26623.zip
bugfix: strings improperly reused
... resulting in some message properties be populated with strings from previous messages. This was caused by an improper predicate check.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/prop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/prop.c b/runtime/prop.c
index 804f3491..d188b2ed 100644
--- a/runtime/prop.c
+++ b/runtime/prop.c
@@ -174,7 +174,7 @@ rsRetVal CreateOrReuseStringProp(prop_t **ppThis, uchar *psz, int len)
} else {
/* already exists, check if we can re-use it */
GetString(*ppThis, &pszPrev, &lenPrev);
- if(len != lenPrev && ustrcmp(psz, pszPrev)) {
+ if(len != lenPrev || ustrcmp(psz, pszPrev)) {
/* different, need to discard old & create new one */
propDestruct(ppThis);
CHKiRet(CreateStringProp(ppThis, psz, len));