summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--runtime/statsobj.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f5031ea..42cfac2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ Version 5.8.7 [V5-stable] 2011-??-??
- bugfix: potential abort after reading invalid X.509 certificate
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=290
Thanks to Tomas Heinrich for the patch
+- bugfix: stats counter were not properly initialized on creation
---------------------------------------------------------------------------
Version 5.8.6 [V5-stable] 2011-10-21
- bugfix: missing whitespace after property-based filter was not detected
diff --git a/runtime/statsobj.c b/runtime/statsobj.c
index e1a89cf4..131605e0 100644
--- a/runtime/statsobj.c
+++ b/runtime/statsobj.c
@@ -154,9 +154,11 @@ addCounter(statsobj_t *pThis, uchar *ctrName, statsCtrType_t ctrType, void *pCtr
switch(ctrType) {
case ctrType_IntCtr:
ctr->val.pIntCtr = (intctr_t*) pCtr;
+ *(ctr->val.pIntCtr) = 0;
break;
case ctrType_Int:
ctr->val.pInt = (int*) pCtr;
+ *(ctr->val.pInt) = 0;
break;
}
addCtrToList(pThis, ctr);