[epiphany] password-manager: copy lists in synchronizable_manager_merge()



commit 2c723ef445684cae1842e3d112b7326be11552d4
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Feb 24 15:09:41 2020 -0600

    password-manager: copy lists in synchronizable_manager_merge()
    
    We are failing to properly transfer ownership here. Both EphySyncService
    and EphyPasswordManager require ownership, and GList is not refcounted,
    so we just need to make a copy of the list. The list members are
    GObjects though, so we don't need to copy the underlying data, only ref
    it.
    
    Fixes #1110

 lib/sync/ephy-password-manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/sync/ephy-password-manager.c b/lib/sync/ephy-password-manager.c
index b03c3d7a2..681dd61f1 100644
--- a/lib/sync/ephy-password-manager.c
+++ b/lib/sync/ephy-password-manager.c
@@ -1170,8 +1170,8 @@ synchronizable_manager_merge (EphySynchronizableManager              *manager,
                                merge_cb,
                                merge_passwords_async_data_new (self,
                                                                is_initial,
-                                                               remotes_deleted,
-                                                               remotes_updated,
+                                                               g_list_copy_deep (remotes_deleted, 
(GCopyFunc)g_object_ref, NULL),
+                                                               g_list_copy_deep (remotes_updated, 
(GCopyFunc)g_object_ref, NULL),
                                                                callback,
                                                                user_data));
 }


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