[empathy] Fix memleak in log_store_empathy_get_chats_for_dir. Only build filename if its
- From: Lars-Peter Clausen <larsc src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Fix memleak in log_store_empathy_get_chats_for_dir. Only build filename if its
- Date: Tue, 21 Apr 2009 04:49:23 -0400 (EDT)
commit ddae3ae13b1bf6368bd91327357e3c6999ac6a45
Author: Lars-Peter Clausen <lars metafoo de>
Date: Fri Apr 17 23:00:10 2009 +0200
Fix memleak in log_store_empathy_get_chats_for_dir. Only build filename if its
needed and freed again.
---
libempathy/empathy-log-store-empathy.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index 11e64e0..37a7667 100644
--- a/libempathy/empathy-log-store-empathy.c
+++ b/libempathy/empathy-log-store-empathy.c
@@ -641,17 +641,15 @@ log_store_empathy_get_chats_for_dir (EmpathyLogStore *self,
while ((name = g_dir_read_name (gdir)) != NULL)
{
EmpathyLogSearchHit *hit;
- gchar *filename;
- filename = g_build_filename (dir, name, NULL);
if (!is_chatroom && strcmp (name, LOG_DIR_CHATROOMS) == 0)
{
+ gchar *filename = g_build_filename (dir, name, NULL);
hits = g_list_concat (hits, log_store_empathy_get_chats_for_dir (
self, filename, TRUE));
g_free (filename);
continue;
}
-
hit = g_slice_new0 (EmpathyLogSearchHit);
hit->chat_id = g_strdup (name);
hit->is_chatroom = is_chatroom;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]