From c6dad0a7a26a1aad773b663d4a1cb3c2d4a80493 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 8 Apr 2015 14:08:04 +0200 Subject: 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 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkcs11') diff --git a/pkcs11/gkm/gkm-session.c b/pkcs11/gkm/gkm-session.c index db237226..6ec8737d 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) -- cgit v1.2.1