Fixed multiple memory leaks
This commit is contained in:
parent
1d4f64d745
commit
a09e1a0e45
3 changed files with 8 additions and 0 deletions
|
@ -59,6 +59,9 @@ void destroy_execp(void *obj)
|
|||
// This is a frontend element
|
||||
execp->backend->instances = g_list_remove_all(execp->backend->instances, execp);
|
||||
free_and_null(execp->frontend);
|
||||
remove_area(&execp->area);
|
||||
free_area(&execp->area);
|
||||
free_and_null(execp);
|
||||
} else {
|
||||
// This is a backend element
|
||||
stop_timeout(execp->backend->timer);
|
||||
|
|
|
@ -305,6 +305,7 @@ void free_themes(IconThemeWrapper *wrapper)
|
|||
{
|
||||
if (!wrapper)
|
||||
return;
|
||||
free(wrapper->icon_theme_name);
|
||||
for (GSList *l = wrapper->themes; l; l = l->next) {
|
||||
IconTheme *theme = (IconTheme *)l->data;
|
||||
free_icon_theme(theme);
|
||||
|
|
|
@ -452,7 +452,11 @@ void launcher_reload_icon(Launcher *launcher, LauncherIcon *launcherIcon)
|
|||
DesktopEntry entry;
|
||||
if (read_desktop_file(launcherIcon->config_path, &entry) && entry.exec) {
|
||||
schedule_redraw(&launcherIcon->area);
|
||||
if (launcherIcon->cmd)
|
||||
free(launcherIcon->cmd);
|
||||
launcherIcon->cmd = strdup(entry.exec);
|
||||
if (launcherIcon->icon_name)
|
||||
free(launcherIcon->icon_name);
|
||||
launcherIcon->icon_name = entry.icon ? strdup(entry.icon) : strdup(DEFAULT_ICON);
|
||||
if (entry.name) {
|
||||
if (entry.generic_name) {
|
||||
|
|
Loading…
Reference in a new issue