Update light_data_template_sample.c
This commit is contained in:
@@ -245,6 +245,10 @@ static qcloud_err_t property_update(const char *json_doc, shadow_dev_property_t
|
|||||||
|
|
||||||
/* convert const char * to char * */
|
/* convert const char * to char * */
|
||||||
json_doc_mutable = osal_malloc(strlen(json_doc));
|
json_doc_mutable = osal_malloc(strlen(json_doc));
|
||||||
|
if(!json_doc_mutable)
|
||||||
|
{
|
||||||
|
return QCLOUD_ERR_FAILURE;
|
||||||
|
}
|
||||||
QCLOUD_FUNC_EXIT_RC_IF(json_doc_mutable, NULL, QCLOUD_ERR_FAILURE);
|
QCLOUD_FUNC_EXIT_RC_IF(json_doc_mutable, NULL, QCLOUD_ERR_FAILURE);
|
||||||
strcpy(json_doc_mutable, json_doc);
|
strcpy(json_doc_mutable, json_doc);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user