[epiphany] bookmarks-manager: Fix use-after-free in _remove_bookmark()



commit 2c9c7e7b72799993d9f5220d8dbbae3945a3634d
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed Feb 22 14:20:16 2017 -0600

    bookmarks-manager: Fix use-after-free in _remove_bookmark()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776738

 src/bookmarks/ephy-bookmarks-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmarks-manager.c b/src/bookmarks/ephy-bookmarks-manager.c
index a71e921..b1be991 100644
--- a/src/bookmarks/ephy-bookmarks-manager.c
+++ b/src/bookmarks/ephy-bookmarks-manager.c
@@ -380,13 +380,13 @@ ephy_bookmarks_manager_remove_bookmark (EphyBookmarksManager *self,
   g_sequence_remove (iter);
   g_list_model_items_changed (G_LIST_MODEL (self), position, 1, 0);
   g_signal_emit (self, signals[BOOKMARK_REMOVED], 0, bookmark);
-  g_object_unref (bookmark);
 
   ephy_bookmarks_manager_save_to_file_async (self, NULL,
                                              
(GAsyncReadyCallback)ephy_bookmarks_manager_save_to_file_warn_on_error_cb,
                                              NULL);
 
   ephy_bookmarks_manager_unwatch_bookmark (self, bookmark);
+  g_object_unref (bookmark);
 }
 
 EphyBookmark *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]