Update json_token.c
This commit is contained in:
@@ -91,6 +91,9 @@ list_head_t *LITE_json_keys_of(char *src, char *prefix)
|
|||||||
json_key_t *entry = NULL;
|
json_key_t *entry = NULL;
|
||||||
|
|
||||||
entry = HAL_Malloc(sizeof(json_key_t));
|
entry = HAL_Malloc(sizeof(json_key_t));
|
||||||
|
if (NULL == entry) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
memset(entry, 0, sizeof(json_key_t));
|
memset(entry, 0, sizeof(json_key_t));
|
||||||
entry->key = LITE_format_string("%s%.*s", prefix, klen, key);
|
entry->key = LITE_format_string("%s%.*s", prefix, klen, key);
|
||||||
list_add_tail(&entry->list, &keylist);
|
list_add_tail(&entry->list, &keylist);
|
||||||
@@ -109,6 +112,9 @@ list_head_t *LITE_json_keys_of(char *src, char *prefix)
|
|||||||
json_key_t *entry = NULL;
|
json_key_t *entry = NULL;
|
||||||
|
|
||||||
entry = HAL_Malloc(sizeof(json_key_t));
|
entry = HAL_Malloc(sizeof(json_key_t));
|
||||||
|
if (NULL == entry) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
memset(entry, 0, sizeof(json_key_t));
|
memset(entry, 0, sizeof(json_key_t));
|
||||||
list_add_tail(&entry->list, &keylist);
|
list_add_tail(&entry->list, &keylist);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user