char *path = NULL;
char *storage_path = NULL;
storage_get_root_directory(storage_id, &path);
- if (!strcmp(path, "(null)")) {
+ if (!path) {
+ return NULL;
+ } else if (!strcmp(path, "(null)")) {
ug_debug("path is null");
free(path);
return NULL;
} else if (path) {
ug_debug("path is %s", path);
mf_ug_file_attr_get_parent_path(path, &storage_path);
- free(path);
}
+ free(path);
return storage_path;
}
/* File system related value definition */
char *output = NULL;
void *pnode = NULL;
char *omit = MF_UG_PATH_INFO_TRANS_OMIT;
+ if (!omit) {
+ return NULL;
+ }
if (strlen(path_info) < path_info_max_len) {
UG_SAFE_FREE_CHAR(omit);
char *temp = NULL;
char *sep = MF_UG_PATH_INFO_SEP;
EINA_LIST_FOREACH(temp_list, l, pnode) {
+ if (!pnode) {
+ continue;
+ }
ug_pNode *node = (ug_pNode *)pnode;
temp = output;
if (node->flag_trans == TRUE) {
ug_mf_retvm_if(original_path == NULL, NULL, "input path is NULL");
char *current_path = g_strdup(original_path);
+ char *temp_path = current_path;
Eina_List *path_list = NULL;
const char *root_path = NULL;
path_list = eina_list_append(path_list, g_strdup(original_path));
}
UG_TRACE_END;
+ UG_SAFE_FREE_CHAR(temp_path);
return path_list;
}