diff options
author | Stef Walter <stefw@gnome.org> | 2015-04-08 14:08:04 +0200 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2015-04-08 14:09:11 +0200 |
commit | c6dad0a7a26a1aad773b663d4a1cb3c2d4a80493 (patch) | |
tree | 5c6cd657bdb4becb81719489c293ece25f57980b /pkcs11 | |
parent | 55e0b1a607bec29b5c0711741765250742c79666 (diff) | |
download | gnome-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.
Diffstat (limited to 'pkcs11')
-rw-r--r-- | 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 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) |