arg ... add tracking in both "new" functions
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Sat, 8 Dec 2007 19:31:57 +0000 (19:31 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Sat, 8 Dec 2007 19:31:57 +0000 (19:31 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1162 9efc2488-bf62-4759-914b-345cdb29e865

src/libopensrf/osrf_json_object.c

index c87d4c5..9dcd123 100644 (file)
@@ -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;