From 4abede50105a018ef7ac59d9273de3fe15ebd5fe Mon Sep 17 00:00:00 2001 From: Gokul Singaraju Date: Thu, 26 Apr 2018 12:42:18 -0400 Subject: Supports 3rd party json for measurements Issue-ID: CERT-14 Change-Id: Ib0fa11fc5978a4785a056f37198947120b3979a8 Signed-off-by: Gokul Singaraju --- .../evel/evel-library/code/evel_library/evel_jsonobject.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'vnfs/VES5.0/evel/evel-library/code/evel_library/evel_jsonobject.c') diff --git a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_jsonobject.c b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_jsonobject.c index 4f788bd1..8bf2b70f 100644 --- a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_jsonobject.c +++ b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_jsonobject.c @@ -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(); } -- cgit 1.2.3-korg