New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory leak when using --reload on http images #62
Comments
I think the issue might be in So, I commented out I am installing valgrind, not sure I know how to use it... |
|
I commented out my addition for directory reload to reduce the output of valgrind and one hunted down: diff --git a/src/filelist.c b/src/filelist.c
index 215f371..81d84c2 100644
--- a/src/filelist.c
+++ b/src/filelist.c
@@ -327,6 +327,8 @@ int feh_file_info_load(feh_file * file, Imlib_Image im)
if (!im1)
return(1);
+ if (file->info)
+ feh_file_info_free(file->info);
file->info = feh_file_info_new();
file->info->width = gib_imlib_image_get_width(im1); |
Never mind my previous one, it doesn't matter if diff --git a/src/slideshow.c b/src/slideshow.c
index 22d2124..c378c2c 100644
--- a/src/slideshow.c
+++ b/src/slideshow.c
@@ -96,6 +96,10 @@ void cb_reload_timer(void *data)
/* save the current filename for refinding it in new list */
current_filename = estrdup(FEH_FILE(current_file->data)->filename);
+ for (l = filelist; l; l = l->next) {
+ feh_file_free(l->data);
+ l->data = NULL;
+ }
gib_list_free_and_data(filelist);
filelist = NULL;
filelist_len = 0; (It's my fault.) It's all clean except the last one:
Edit: It's xcb and it's been fixed but doesn't seem to be released, my xcb is 1.7. |
Great, thanks! I also have libxcb 1.7 with that memleak here, but yeah, we can only wait 'til they release a version including the fix. |
feh --reload 1 http://... leaks about 4 kilobytes per 15 seconds. It may be related to the filelist handling in cb_reload_timer, but I'm not entirely sure yet.
The text was updated successfully, but these errors were encountered: