CJSON_CDECL declaration in cJSON.h file in sample asset_tracker_v2 application

We have added custom code to default asset_tracker_v2 using SDK1.9.1,  MFW version :- mfw_nrf9160_1.3.1. The data is successfully uploaded to the cloud. After reaching the heap limit APP hangs up.

It is observed that memory stack is not cleared in Azure_iot_hub_codec.c file by function cJSON_delete(root_obj), which has internal hooks with  constant CJSON_CDECL used as member pointer.

 In cJSON.h file, though CJSON_CDECL is defined, how does it helps to free the stack and buffer without pointing to a physical memory location? In order to free the memory, how to modify CJSON_CDECL so that the cjson_delete() works properly.

See the images for cjson_delete() function and CJSON_CDECL below.

       

Parents
  • Hello mexco,

    Thank you for your patience. The DevZone team is currently short staffed because of summer holiday in Norway. Some delays are expected.

    ______________________________________________________________________________________

    I am looking into your case.

    Could you please share the relevant code from Azure_iot_hub_codec.c?

    I will be able to help you further after the weekend.

    Best regards,

    Maria

Reply
  • Hello mexco,

    Thank you for your patience. The DevZone team is currently short staffed because of summer holiday in Norway. Some delays are expected.

    ______________________________________________________________________________________

    I am looking into your case.

    Could you please share the relevant code from Azure_iot_hub_codec.c?

    I will be able to help you further after the weekend.

    Best regards,

    Maria

Children
Related