summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2015-04-08 14:08:04 +0200
committerStef Walter <stefw@gnome.org>2015-04-08 14:09:11 +0200
commitc6dad0a7a26a1aad773b663d4a1cb3c2d4a80493 (patch)
tree5c6cd657bdb4becb81719489c293ece25f57980b
parent55e0b1a607bec29b5c0711741765250742c79666 (diff)
downloadgnome-keyring-c6dad0a7a26a1aad773b663d4a1cb3c2d4a80493.tar.gz
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.
-rw-r--r--pkcs11/gkm/gkm-session.c3
1 files changed, 1 insertions, 2 deletions
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)