[gnome-keyring] gkm: Objects can remove each-other recursively



commit c6dad0a7a26a1aad773b663d4a1cb3c2d4a80493
Author: Stef Walter <stefw gnome org>
Date:   Wed Apr 8 14:08:04 2015 +0200

    gkm: Objects can remove each-other recursively
    
    For instance, if an object has a credential, and the object is
    removed, then the credential self-destructs. Now if both of those
    are owned by a session, and the session is closed, then all the
    objects are removed at once. The self-destruct should become
    a noop instead of complaining.

 pkcs11/gkm/gkm-session.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/pkcs11/gkm/gkm-session.c b/pkcs11/gkm/gkm-session.c
index db23722..6ec8737 100644
--- a/pkcs11/gkm/gkm-session.c
+++ b/pkcs11/gkm/gkm-session.c
@@ -312,8 +312,7 @@ remove_object (GkmSession *self, GkmTransaction *transaction, GkmObject *object)
        g_object_ref (object);
 
        gkm_object_expose_full (object, transaction, FALSE);
-       if (!g_hash_table_remove (self->pv->objects, object))
-               g_return_if_reached ();
+       g_hash_table_remove (self->pv->objects, object);
        g_object_set (object, "store", NULL, NULL);
 
        if (transaction)


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