[epiphany] bookmarks-manager: Fix leaks in _load_from_file
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] bookmarks-manager: Fix leaks in _load_from_file
- Date: Mon, 21 Nov 2016 21:09:51 +0000 (UTC)
commit 0dc4191bedcaac174ad5ac4eb785e4195a4450e9
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Nov 21 14:11:25 2016 -0600
bookmarks-manager: Fix leaks in _load_from_file
Direct leak of 80 byte(s) in 1 object(s) allocated from:
#0 0x7fd43d6ae020 in calloc (/lib64/libasan.so.3+0xc7020)
#1 0x7fd4291b895f in g_malloc0
/home/mcatanzaro/src/jhbuild/checkout/glib/glib/gmem.c:124
#2 0x7fd4291b8c27 in g_malloc0_n
/home/mcatanzaro/src/jhbuild/checkout/glib/glib/gmem.c:355
#3 0x7fd43d0da5e7 in gvdb_table_get_names
/home/mcatanzaro/src/jhbuild/checkout/epiphany/gvdb/gvdb/gvdb-reader.c:381
#4 0x7fd43d0653ed in ephy_bookmarks_manager_load_from_file
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/bookmarks/ephy-bookmarks-manager.c:577
#5 0x7fd43d06426a in ephy_bookmarks_manager_init
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/bookmarks/ephy-bookmarks-manager.c:223
#6 0x7fd42c82cc55 in g_type_create_instance
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gtype.c:1866
#7 0x7fd42c8132aa in g_object_new_internal
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:1783
#8 0x7fd42c8137b9 in g_object_newv
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:1930
#9 0x7fd42c812e5b in g_object_new
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:1623
#10 0x7fd43d0642fc in ephy_bookmarks_manager_new
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/bookmarks/ephy-bookmarks-manager.c:245
#11 0x7fd43d0823bf in ephy_shell_get_bookmarks_manager
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/ephy-shell.c:773
#12 0x7fd43d067ce7 in ephy_bookmarks_popover_init
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/bookmarks/ephy-bookmarks-popover.c:485
#13 0x7fd42c82cc55 in g_type_create_instance
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gtype.c:1866
#14 0x7fd42c8132aa in g_object_new_internal
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:1783
#15 0x7fd42c813efe in g_object_new_valist
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:2042
#16 0x7fd42c812eaa in g_object_new
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:1626
#17 0x7fd43d068386 in ephy_bookmarks_popover_new
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/bookmarks/ephy-bookmarks-popover.c:559
#18 0x7fd43d06fda0 in ephy_header_bar_constructed
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/ephy-header-bar.c:701
#19 0x7fd42c8133f5 in g_object_new_internal
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:1823
#20 0x7fd42c813efe in g_object_new_valist
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:2042
#21 0x7fd42c812eaa in g_object_new
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:1626
#22 0x7fd43d070565 in ephy_header_bar_new
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/ephy-header-bar.c:793
#23 0x7fd43d08cf31 in setup_header_bar
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/ephy-window.c:2835
#24 0x7fd43d08d7b2 in ephy_window_constructed
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/ephy-window.c:3005
#25 0x7fd42c8133f5 in g_object_new_internal
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:1823
#26 0x7fd42c813efe in g_object_new_valist
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:2042
#27 0x7fd42c812eaa in g_object_new
/home/mcatanzaro/src/jhbuild/checkout/glib/gobject/gobject.c:1626
#28 0x7fd43d08e162 in ephy_window_new
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/ephy-window.c:3134
#29 0x7fd43d07d58d in session_parse_window
/home/mcatanzaro/src/jhbuild/checkout/epiphany/src/ephy-session.c:1082
src/bookmarks/ephy-bookmarks-manager.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmarks-manager.c b/src/bookmarks/ephy-bookmarks-manager.c
index 84a07d8..4acd09f 100644
--- a/src/bookmarks/ephy-bookmarks-manager.c
+++ b/src/bookmarks/ephy-bookmarks-manager.c
@@ -577,7 +577,7 @@ ephy_bookmarks_manager_load_from_file (EphyBookmarksManager *self)
list = gvdb_table_get_names (table, &length);
for (i = 0; i < length; i++)
ephy_bookmarks_manager_create_tag (self, list[i]);
-
+ g_strfreev (list);
gvdb_table_free (table);
/* Get bookmarks table */
@@ -621,9 +621,12 @@ ephy_bookmarks_manager_load_from_file (EphyBookmarksManager *self)
ephy_bookmark_set_modification_time (bookmark, modified);
ephy_bookmark_set_is_uploaded (bookmark, uploaded);
g_sequence_prepend (bookmarks, bookmark);
+
+ g_variant_unref (value);
}
ephy_bookmarks_manager_add_bookmarks (self, bookmarks);
+ g_strfreev (list);
gvdb_table_free (table);
g_sequence_free (bookmarks);
gvdb_table_free (root_table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]