Skip to content
Snippets Groups Projects
Commit f05ba61a authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Fix memory leak when closing images opened from thumbnail mode

parent f27be5de
No related branches found
No related tags found
No related merge requests found
......@@ -686,6 +686,7 @@ void feh_filelist_image_remove(winwidget winwid, char do_delete)
filelist = feh_file_rm_and_free(filelist, winwid->file);
else
filelist = feh_file_remove_from_list(filelist, winwid->file);
winwid->file = NULL;
winwidget_destroy(winwid);
}
}
......
......@@ -755,6 +755,8 @@ void winwidget_destroy(winwidget winwid)
free(winwid->name);
if (winwid->gc)
XFreeGC(disp, winwid->gc);
if ((winwid->type == WIN_TYPE_THUMBNAIL_VIEWER) && (winwid->file != NULL))
gib_list_free(winwid->file);
if (winwid->im)
gib_imlib_free_image_and_decache(winwid->im);
free(winwid);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment