Supports 3rd party json for measurements
[demo.git] / vnfs / VES5.0 / evel / evel-library / code / evel_library / evel_jsonobject.c
index 4f788bd..8bf2b70 100644 (file)
@@ -321,7 +321,7 @@ void evel_jsonobject_add_jsoninstance(EVEL_JSON_OBJECT * pobj, EVEL_JSON_OBJECT_
   assert(pobj != NULL);
   assert(jinst != NULL);
 
-  EVEL_DEBUG("Adding json object instance");
+  EVEL_DEBUG("Adding json object instance %p",jinst);
 
   dlist_push_last(&pobj->jsonobjectinstances, jinst);
 
@@ -375,6 +375,7 @@ void evel_free_internal_key(EVEL_INTERNAL_KEY * keyp)
 
   free(keyp->keyname);
   evel_free_option_string(&keyp->keyvalue);
+  free(keyp);
   EVEL_EXIT();
 }
 
@@ -407,6 +408,7 @@ void evel_free_jsonobjinst(EVEL_JSON_OBJECT_INSTANCE * objinst)
     evel_free_internal_key(other_field);
     other_field = dlist_pop_last(&objinst->object_keys);
   }
+  free(objinst);
 
   EVEL_EXIT();
 }
@@ -425,6 +427,7 @@ void evel_free_jsonobject(EVEL_JSON_OBJECT * jsobj)
   EVEL_ENTER();
   assert(jsobj != NULL);
 
+  EVEL_DEBUG("Freeing Json Object (%s)", jsobj->object_name);
   free(jsobj->object_name);
   evel_free_option_string(&jsobj->objectschema);
   evel_free_option_string(&jsobj->objectschemaurl);
@@ -437,11 +440,12 @@ void evel_free_jsonobject(EVEL_JSON_OBJECT * jsobj)
   other_field = dlist_pop_last(&jsobj->jsonobjectinstances);
   while (other_field != NULL)
   {
-    EVEL_DEBUG("Freeing Object Instance Field (%s)",
-               other_field->jsonstring);
+    EVEL_DEBUG("Freeing jsonObject Instance Field %p (%s)",
+               other_field,other_field->jsonstring);
     evel_free_jsonobjinst(other_field);
     other_field = dlist_pop_last(&jsobj->jsonobjectinstances);
   }
+  free(jsobj);
 
   EVEL_EXIT();
 }