summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-04-07 11:14:45 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-04-07 11:15:45 +0200
commitb59da43c99019232ae9f7b7e67d722b38f43b24c (patch)
tree0d588c34a09a75d90c87258873ce7f4f1e8f00e2
parent7f9960fee8997d2326548c4c9d23278761defb5d (diff)
feh_file_info_preload: free feh_file data structure when removing list items
-rw-r--r--ChangeLog1
-rw-r--r--src/filelist.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ea8958a..6cd9eb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ git HEAD
(sourcing it still works)
* --max-dimension: ignore width/height limit of 0 pixels
* Fix memory leak when a slideshow contains many unloadable images
+ * Fix memory leak when --prelaod removes files from the filelist
Thu, 15 May 2014 23:41:07 +0200 Daniel Friesel <derf+feh@finalrewind.org>
diff --git a/src/filelist.c b/src/filelist.c
index f31f05b..eaef54b 100644
--- a/src/filelist.c
+++ b/src/filelist.c
@@ -332,8 +332,10 @@ gib_list *feh_file_info_preload(gib_list * list)
feh_display_status(0);
if (remove_list) {
- for (l = remove_list; l; l = l->next)
+ for (l = remove_list; l; l = l->next) {
+ feh_file_free(FEH_FILE(((gib_list *) l->data)->data));
filelist = list = gib_list_remove(list, (gib_list *) l->data);
+ }
gib_list_free(remove_list);
}