From 4d52aba1fe2cb323987deb815f94ccb63a26f4fc Mon Sep 17 00:00:00 2001 From: miker Date: Sat, 8 Dec 2007 19:31:57 +0000 Subject: [PATCH] arg ... add tracking in both "new" functions git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1162 9efc2488-bf62-4759-914b-345cdb29e865 --- src/libopensrf/osrf_json_object.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libopensrf/osrf_json_object.c b/src/libopensrf/osrf_json_object.c index c87d4c5..9dcd123 100644 --- a/src/libopensrf/osrf_json_object.c +++ b/src/libopensrf/osrf_json_object.c @@ -110,9 +110,12 @@ jsonObject* jsonNewObjectFmt(const char* data, ...) { if( freeObjList ) { o = (jsonObject*) freeObjList; freeObjList = freeObjList->next; - } - else + unusedObjRelease++; + currentListLen--; + } else { OSRF_MALLOC( o, sizeof(jsonObject) ); + mallocObjCreate++; + } o->size = 0; o->classname = NULL; -- 2.11.0