From 2eb7c968eef3900a447f5294e8a8e9897a344d61 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 6 May 2020 10:22:27 +0900 Subject: [PATCH] Fix memory leak issue Change-Id: I84fa3ae708b0449a98fb5a8beca07c567bf02177 Signed-off-by: Jihoon Kim --- sticker-parser/sticker-parser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sticker-parser/sticker-parser.c b/sticker-parser/sticker-parser.c index 9d73dd3..a9c92ea 100644 --- a/sticker-parser/sticker-parser.c +++ b/sticker-parser/sticker-parser.c @@ -605,8 +605,10 @@ static int __get_sticker_info_from_json(const char *appid, const char *file_path goto free_memory; char *rel_thumbnail = __get_string_from_object(info_object, "thumbnail"); - if (rel_thumbnail && rel_thumbnail[0] != '\0') { - thumbnail_path = __convert_sticker_uri(rel_thumbnail, appid, app_path); + if (rel_thumbnail) { + if (rel_thumbnail[0] != '\0') + thumbnail_path = __convert_sticker_uri(rel_thumbnail, appid, app_path); + free(rel_thumbnail); } -- 2.7.4