Azure / azure-iot-sdk-c

A C99 SDK for connecting devices to Microsoft Azure IoT services
https://azure.github.io/azure-iot-sdk-c
Other
585 stars 739 forks source link

cleanup_prov_info function issue #2529

Closed haiyang-lhy closed 11 months ago

haiyang-lhy commented 11 months ago

I think the function cleanup_prov_info free NULL pointer (prov_info->iothub_info.device_id/prov_info->iothub_info.iothub_key/prov_info->iothub_info.iothub_url). because I don't find any code to initialize them in SDK.
please confirme!

prov_device_ll_client.c (provisioning_client\src) line 702 : static void cleanup_prov_info(PROV_INSTANCE_INFO* prov_info) free(prov_info->iothub_info.device_id); prov_info->iothub_info.device_id = NULL; free(prov_info->iothub_info.iothub_key); prov_info->iothub_info.iothub_key = NULL; free(prov_info->iothub_info.iothub_url); prov_info->iothub_info.iothub_url = NULL;

ewertons commented 11 months ago

Addressed by PR #2531