From 8d2f6675c47c0b7b6d7c644004507d0a85a90cb4 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 20 Dec 2011 18:17:45 +0100 Subject: bugfix: stats counter were not properly initialized on creation --- runtime/statsobj.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime') 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); -- cgit