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;
}
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 =