char *_attr_platform = NULL;
char *_alias_attr_user = NULL;
char *_alias_attr_platform = NULL;
+ attribute_s *_attr = NULL;
+ attribute_s *_alias_attr = NULL;
ret = _media_filter_attribute_create(&g_attr_handle);
media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (ret != MEDIA_CONTENT_ERROR_NONE)
goto ERROR;
- attribute_s *_attr = (attribute_s*)g_attr_handle;
- attribute_s *_alias_attr = (attribute_s*)g_alias_attr_handle;
+ _attr = (attribute_s*)g_attr_handle;
+ _alias_attr = (attribute_s*)g_alias_attr_handle;
count = sizeof(g_content_attrs_info) / sizeof((g_content_attrs_info)[0]);
if (STRING_VALID(replace_str)) {
SAFE_FREE(token->str);
token->str = replace_str;
+ } else {
+ SAFE_FREE(replace_str);
}
}
}
SAFE_FREE(replace_str);
} else {
media_content_error("There is no matched db field for %s", token->str);
+ SAFE_FREE(replace_str);
}
}
}
if (STRING_VALID(replace_str)) {
SAFE_FREE(token->str);
token->str = replace_str;
+ } else {
+ SAFE_FREE(replace_str);
}
}
}
*storage_id = NULL;
ret = MEDIA_CONTENT_ERROR_DB_FAILED;
}
- ret = MEDIA_CONTENT_ERROR_NONE;
} else {
media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
bool gallery_media_item_cb(media_info_h media, void *user_data)
{
media_info_h new_media = NULL;
- media_info_clone(&new_media, media);
+ int ret = MEDIA_CONTENT_ERROR_NONE;
- GList **list = (GList**)user_data;
- *list = g_list_append(*list, new_media);
+ ret = media_info_clone(&new_media, media);
+
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
+ GList **list = (GList**)user_data;
+ *list = g_list_append(*list, new_media);
+ }
return true;
}