char *uri = NULL;
char *group = NULL;
char *description = NULL;
- char *thumbnail = NULL;
+ char *thumbnail_path = NULL;
char *uri_path = NULL;
parser = json_parser_new();
if (!group)
goto free_memory;
- thumbnail = __get_string_from_object(info_object, "thumbnail");
- if (thumbnail) {
- free(thumbnail);
- thumbnail = __convert_sticker_uri(thumbnail, appid, app_path);
+ char *rel_thumbnail = __get_string_from_object(info_object, "thumbnail");
+ if (rel_thumbnail) {
+ thumbnail_path = __convert_sticker_uri(rel_thumbnail, appid, app_path);
+ free(rel_thumbnail);
}
description = __get_string_from_object(info_object, "description");
char *new_uri = __convert_sticker_uri(uri, appid, app_path);
if (!new_uri)
goto free_memory;
- __insert_sticker_info(appid, type, new_uri, group, thumbnail, description, disp_type);
+ __insert_sticker_info(appid, type, new_uri, group, thumbnail_path, description, disp_type);
if (new_uri) {
free(new_uri);
uri_path = NULL;
goto free_memory;
}
- __insert_sticker_info(appid, type, new_uri, group, thumbnail, description, disp_type);
+ __insert_sticker_info(appid, type, new_uri, group, thumbnail_path, description, disp_type);
free(new_uri);
new_uri = NULL;
}
}
} else {
- __insert_sticker_info(appid, type, uri, group, thumbnail, description, disp_type);
+ __insert_sticker_info(appid, type, uri, group, thumbnail_path, description, disp_type);
}
for (int j = 0; j < keyword_arr_len; j++) {
group = NULL;
}
- if (thumbnail) {
- free(thumbnail);
- thumbnail = NULL;
+ if (thumbnail_path) {
+ free(thumbnail_path);
+ thumbnail_path = NULL;
}
if (description) {