forked from enlightenment/efl
leaks--! this code is riddled with leaks! really really bad!
SVN revision: 39647
This commit is contained in:
parent
19802a5705
commit
ddb11ee846
|
@ -66,6 +66,7 @@ static void efreet_icon_theme_index_read(Efreet_Icon_Theme *theme,
|
||||||
|
|
||||||
static Efreet_Icon_Theme_Directory *efreet_icon_theme_directory_new(Efreet_Ini *ini,
|
static Efreet_Icon_Theme_Directory *efreet_icon_theme_directory_new(Efreet_Ini *ini,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
static void efreet_icon_theme_directory_free(Efreet_Icon_Theme_Directory *dir);
|
||||||
|
|
||||||
static void efreet_icon_theme_cache_check(Efreet_Icon_Theme *theme);
|
static void efreet_icon_theme_cache_check(Efreet_Icon_Theme *theme);
|
||||||
static int efreet_icon_theme_cache_check_dir(Efreet_Icon_Theme *theme,
|
static int efreet_icon_theme_cache_check_dir(Efreet_Icon_Theme *theme,
|
||||||
|
@ -131,18 +132,26 @@ efreet_icon_init(void)
|
||||||
void
|
void
|
||||||
efreet_icon_shutdown(void)
|
efreet_icon_shutdown(void)
|
||||||
{
|
{
|
||||||
|
void *d;
|
||||||
|
|
||||||
if (--efreet_icon_init_count)
|
if (--efreet_icon_init_count)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IF_FREE(efreet_icon_user_dir);
|
IF_FREE(efreet_icon_user_dir);
|
||||||
IF_FREE(efreet_icon_deprecated_user_dir);
|
IF_FREE(efreet_icon_deprecated_user_dir);
|
||||||
|
|
||||||
IF_FREE_LIST(efreet_icon_extensions);
|
EINA_LIST_FREE(efreet_icon_extensions, d) free(d);
|
||||||
IF_FREE_HASH(efreet_icon_themes);
|
IF_FREE_HASH(efreet_icon_themes);
|
||||||
IF_FREE_LIST(efreet_extra_icon_dirs);
|
IF_FREE_LIST(efreet_extra_icon_dirs);
|
||||||
|
|
||||||
IF_FREE_HASH(efreet_icon_cache);
|
IF_FREE_HASH(efreet_icon_cache);
|
||||||
|
|
||||||
|
if (fake_null)
|
||||||
|
{
|
||||||
|
efreet_icon_theme_free(fake_null);
|
||||||
|
fake_null = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
ecore_shutdown();
|
ecore_shutdown();
|
||||||
efreet_icon_init_count = 0;
|
efreet_icon_init_count = 0;
|
||||||
}
|
}
|
||||||
|
@ -324,6 +333,7 @@ efreet_icon_find_theme_check(const char *theme_name)
|
||||||
if (theme_name) theme = efreet_icon_theme_find(theme_name);
|
if (theme_name) theme = efreet_icon_theme_find(theme_name);
|
||||||
if (!theme)
|
if (!theme)
|
||||||
{
|
{
|
||||||
|
if ((fake_null) && (!theme_name)) return fake_null;
|
||||||
theme = efreet_icon_theme_new();
|
theme = efreet_icon_theme_new();
|
||||||
theme->fake = 1;
|
theme->fake = 1;
|
||||||
if (theme_name)
|
if (theme_name)
|
||||||
|
@ -1107,19 +1117,20 @@ efreet_icon_theme_new(void)
|
||||||
static void
|
static void
|
||||||
efreet_icon_theme_free(Efreet_Icon_Theme *theme)
|
efreet_icon_theme_free(Efreet_Icon_Theme *theme)
|
||||||
{
|
{
|
||||||
if (!theme) return;
|
void *d;
|
||||||
|
if (!theme) return;
|
||||||
|
|
||||||
IF_RELEASE(theme->name.internal);
|
IF_RELEASE(theme->name.internal);
|
||||||
IF_RELEASE(theme->name.name);
|
IF_RELEASE(theme->name.name);
|
||||||
|
|
||||||
IF_FREE(theme->comment);
|
IF_FREE(theme->comment);
|
||||||
IF_FREE(theme->example_icon);
|
IF_FREE(theme->example_icon);
|
||||||
|
|
||||||
IF_FREE_LIST(theme->paths);
|
EINA_LIST_FREE(theme->paths, d) free(d);
|
||||||
IF_FREE_LIST(theme->inherits);
|
EINA_LIST_FREE(theme->inherits, d) free(d);
|
||||||
IF_FREE_LIST(theme->directories);
|
EINA_LIST_FREE(theme->directories, d) efreet_icon_theme_directory_free(d);
|
||||||
|
|
||||||
FREE(theme);
|
FREE(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1490,6 +1501,13 @@ efreet_icon_theme_directory_new(Efreet_Ini *ini, const char *name)
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
efreet_icon_theme_directory_free(Efreet_Icon_Theme_Directory *dir)
|
||||||
|
{
|
||||||
|
free(dir->name);
|
||||||
|
free(dir);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
efreet_icon_cache_find(Efreet_Icon_Cache *value, const char *key)
|
efreet_icon_cache_find(Efreet_Icon_Cache *value, const char *key)
|
||||||
{
|
{
|
||||||
|
|
|
@ -280,6 +280,7 @@ static void efreet_menu_create_default_layout_list(Efreet_Menu_Internal *interna
|
||||||
static char *efreet_menu_path_get(Efreet_Menu_Internal *internal, const char *suffix);
|
static char *efreet_menu_path_get(Efreet_Menu_Internal *internal, const char *suffix);
|
||||||
|
|
||||||
static Efreet_Menu_App_Dir *efreet_menu_app_dir_new(void);
|
static Efreet_Menu_App_Dir *efreet_menu_app_dir_new(void);
|
||||||
|
static void efreet_menu_app_dir_free(Efreet_Menu_App_Dir *dir);
|
||||||
|
|
||||||
static Efreet_Menu_Move *efreet_menu_move_new(void);
|
static Efreet_Menu_Move *efreet_menu_move_new(void);
|
||||||
static void efreet_menu_move_free(Efreet_Menu_Move *move);
|
static void efreet_menu_move_free(Efreet_Menu_Move *move);
|
||||||
|
@ -987,6 +988,8 @@ efreet_menu_internal_new(void)
|
||||||
void
|
void
|
||||||
efreet_menu_internal_free(Efreet_Menu_Internal *internal)
|
efreet_menu_internal_free(Efreet_Menu_Internal *internal)
|
||||||
{
|
{
|
||||||
|
void *d;
|
||||||
|
|
||||||
if (!internal) return;
|
if (!internal) return;
|
||||||
|
|
||||||
IF_FREE(internal->file.path);
|
IF_FREE(internal->file.path);
|
||||||
|
@ -998,7 +1001,8 @@ efreet_menu_internal_free(Efreet_Menu_Internal *internal)
|
||||||
IF_FREE_LIST(internal->applications);
|
IF_FREE_LIST(internal->applications);
|
||||||
|
|
||||||
IF_FREE_DLIST(internal->directories);
|
IF_FREE_DLIST(internal->directories);
|
||||||
IF_FREE_LIST(internal->app_dirs);
|
EINA_LIST_FREE(internal->app_dirs, d) efreet_menu_app_dir_free(d);
|
||||||
|
// IF_FREE_LIST(internal->app_dirs);
|
||||||
IF_FREE_LIST(internal->app_pool);
|
IF_FREE_LIST(internal->app_pool);
|
||||||
IF_FREE_DLIST(internal->directory_dirs);
|
IF_FREE_DLIST(internal->directory_dirs);
|
||||||
IF_FREE_HASH(internal->directory_cache);
|
IF_FREE_HASH(internal->directory_cache);
|
||||||
|
@ -1723,7 +1727,10 @@ efreet_menu_merge_dir(Efreet_Menu_Internal *parent, Efreet_Xml *xml, const char
|
||||||
|
|
||||||
snprintf(dir_path, PATH_MAX, "%s/%s", path, file->d_name);
|
snprintf(dir_path, PATH_MAX, "%s/%s", path, file->d_name);
|
||||||
if (!efreet_menu_merge(parent, xml, dir_path))
|
if (!efreet_menu_merge(parent, xml, dir_path))
|
||||||
|
{
|
||||||
|
closedir(files);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
closedir(files);
|
closedir(files);
|
||||||
|
|
||||||
|
@ -1895,6 +1902,7 @@ efreet_menu_handle_legacy_dir_helper(Efreet_Menu_Internal *root,
|
||||||
legacy_internal, file_path, prefix);
|
legacy_internal, file_path, prefix);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
|
efreet_menu_filter_free(filter);
|
||||||
efreet_menu_internal_free(legacy_internal);
|
efreet_menu_internal_free(legacy_internal);
|
||||||
FREE(path);
|
FREE(path);
|
||||||
closedir(files);
|
closedir(files);
|
||||||
|
@ -1947,6 +1955,7 @@ efreet_menu_handle_legacy_dir_helper(Efreet_Menu_Internal *root,
|
||||||
closedir(files);
|
closedir(files);
|
||||||
|
|
||||||
FREE(path);
|
FREE(path);
|
||||||
|
efreet_menu_filter_free(filter);
|
||||||
return legacy_internal;
|
return legacy_internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3198,6 +3207,14 @@ efreet_menu_app_dir_new(void)
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
efreet_menu_app_dir_free(Efreet_Menu_App_Dir *dir)
|
||||||
|
{
|
||||||
|
free(dir->path);
|
||||||
|
free(dir->prefix);
|
||||||
|
free(dir);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
* @param a: The app dir to compare too
|
* @param a: The app dir to compare too
|
||||||
|
@ -3233,6 +3250,7 @@ efreet_menu_create_directory_dirs_list(Efreet_Menu_Internal *internal)
|
||||||
if (!internal || internal->directory_dirs) return;
|
if (!internal || internal->directory_dirs) return;
|
||||||
|
|
||||||
internal->directory_dirs = ecore_dlist_new();
|
internal->directory_dirs = ecore_dlist_new();
|
||||||
|
ecore_dlist_free_cb_set(internal->directory_dirs, free);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3273,6 +3291,7 @@ efreet_menu_create_directories_list(Efreet_Menu_Internal *internal)
|
||||||
if (!internal || internal->directories) return;
|
if (!internal || internal->directories) return;
|
||||||
|
|
||||||
internal->directories = ecore_dlist_new();
|
internal->directories = ecore_dlist_new();
|
||||||
|
ecore_dlist_free_cb_set(internal->directories, free);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
|
|
@ -186,6 +186,8 @@ efreet_mime_init(void)
|
||||||
EAPI void
|
EAPI void
|
||||||
efreet_mime_shutdown(void)
|
efreet_mime_shutdown(void)
|
||||||
{
|
{
|
||||||
|
void *d;
|
||||||
|
|
||||||
if (_init_count == 0)
|
if (_init_count == 0)
|
||||||
return;
|
return;
|
||||||
_init_count--;
|
_init_count--;
|
||||||
|
@ -194,8 +196,8 @@ efreet_mime_shutdown(void)
|
||||||
|
|
||||||
efreet_mime_icons_debug();
|
efreet_mime_icons_debug();
|
||||||
|
|
||||||
IF_FREE_LIST(globs);
|
EINA_LIST_FREE(globs, d) efreet_mime_glob_free(d);
|
||||||
IF_FREE_LIST(magics);
|
EINA_LIST_FREE(magics, d) efreet_mime_magic_free(d);
|
||||||
IF_FREE_HASH(monitors);
|
IF_FREE_HASH(monitors);
|
||||||
IF_FREE_HASH(wild);
|
IF_FREE_HASH(wild);
|
||||||
IF_FREE_HASH(mime_icons);
|
IF_FREE_HASH(mime_icons);
|
||||||
|
@ -1125,13 +1127,14 @@ efreet_mime_shared_mimeinfo_magic_parse(char *data, int size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (entry)
|
if (entry)
|
||||||
{
|
{
|
||||||
IF_FREE(entry->value);
|
IF_FREE(entry->value);
|
||||||
IF_FREE(entry->mask);
|
IF_FREE(entry->mask);
|
||||||
FREE(entry);
|
FREE(entry);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -540,7 +540,7 @@ efreet_util_cache_fill(__UNUSED__ void *data)
|
||||||
double start;
|
double start;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
if (!fill->dirs)
|
if ((!fill->dirs) && (!fill->files))
|
||||||
{
|
{
|
||||||
free(fill);
|
free(fill);
|
||||||
idler = NULL;
|
idler = NULL;
|
||||||
|
@ -579,7 +579,10 @@ efreet_util_cache_fill(__UNUSED__ void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
start = ecore_time_get();
|
start = ecore_time_get();
|
||||||
if (!fill->files) fill->files = opendir(fill->current->path);
|
if (!fill->files)
|
||||||
|
{
|
||||||
|
fill->files = opendir(fill->current->path);
|
||||||
|
}
|
||||||
if (!fill->files)
|
if (!fill->files)
|
||||||
{
|
{
|
||||||
/* Couldn't open this dir, continue to next */
|
/* Couldn't open this dir, continue to next */
|
||||||
|
|
Loading…
Reference in New Issue