From: Ravi Kiran K N Date: Mon, 25 Sep 2017 06:05:35 +0000 (+0530) Subject: Fix SVACE issues X-Git-Tag: submit/tizen_4.0/20170926.130649~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=afb41e3e71cb6f8cbb01e042fd6df2b084710188;p=profile%2Fmobile%2Fapps%2Fnative%2Fmyfiles.git Fix SVACE issues Change-Id: I483b71894ca596f9c899cd08dd577be2135bec75 Signed-off-by: Ravi Kiran K N --- diff --git a/src/common/file-system/mf-file-attr.c b/src/common/file-system/mf-file-attr.c index ef5aeac..f15db29 100644 --- a/src/common/file-system/mf-file-attr.c +++ b/src/common/file-system/mf-file-attr.c @@ -1107,11 +1107,13 @@ int mf_file_attr_get_file_icon(const char *file_path, int *error_code, int err_code = mf_file_attr_get_file_ext(file_path, &ext); if (err_code != MYFILE_ERR_NONE || ext == NULL) { mf_warning("Fail to get file extension"); + SAFE_FREE_CHAR(icon_path); return thumbnail_type; } retcode = mime_type_get_mime_type(ext, &mime); if ((mime == NULL) || (retcode != MIME_TYPE_ERROR_NONE)) { mf_warning("Fail to get mime type, set etc icon"); + SAFE_FREE_CHAR(icon_path); SAFE_FREE_CHAR(ext); return thumbnail_type; } @@ -1141,9 +1143,8 @@ int mf_file_attr_get_file_icon(const char *file_path, int *error_code, memset(&tmp_data, 0x00, sizeof(mf_transfer_data_s)); tmp_data.file_path = file_path; tmp_data.media = media_info; - char *condition = NULL; - condition = - g_strdup_printf("%s and MEDIA_PATH=\"%s\"", + char condition[4096]; + g_sprintf("%s and MEDIA_PATH=\"%s\"", MF_CONDITION_IMAGE_VIDEO, tmp_data.file_path); err = diff --git a/src/widget/mf-category-view.c b/src/widget/mf-category-view.c index ec403d9..9845c6f 100644 --- a/src/widget/mf-category-view.c +++ b/src/widget/mf-category-view.c @@ -1030,6 +1030,7 @@ int mf_category_view_item_count_get(int type) } int count = 0; count = mf_media_content_data_count_get(condition); + SAFE_FREE_CHAR(condition); return count; }