Updating branch refs/heads/master
to 7496a3ff356a772d324cffffe166ac6ea1ea053b (commit)
from fc345ef5aadf8668f58da478ca5a30ab510ac274 (commit)
commit 7496a3ff356a772d324cffffe166ac6ea1ea053b
Author: Stephan Arts <[email protected]>
Date: Sun Apr 15 08:07:33 2012 +0200
Fix memory-leak
src/image_list.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/image_list.c b/src/image_list.c
index 569dd3a..d0b5934 100644
--- a/src/image_list.c
+++ b/src/image_list.c
@@ -625,6 +625,7 @@ rstto_image_list_set_directory (
const gchar *filename;
const gchar *content_type;
GFile *child_file;
+ RsttoFile *r_file;
/* Source code block */
rstto_image_list_remove_all (image_list);
@@ -643,10 +644,13 @@ rstto_image_list_set_directory (
filename = g_file_info_get_name (file_info);
content_type = g_file_info_get_content_type (file_info);
child_file = g_file_get_child (dir, filename);
+ r_file = rstto_file_new (child_file);
if (strncmp (content_type, "image/", 6) == 0)
{
- rstto_image_list_add_file (image_list, rstto_file_new
(child_file), NULL);
+ rstto_image_list_add_file (image_list, r_file, NULL);
}
+ g_object_unref (r_file);
+ r_file = NULL;
}
g_object_unref (file_enumerator);
file_enumerator = NULL;
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits