diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/p11-capi-token.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/module/p11-capi-token.c b/module/p11-capi-token.c index f6ef2ca..c76d6ce 100644 --- a/module/p11-capi-token.c +++ b/module/p11-capi-token.c @@ -177,6 +177,7 @@ object_hash_func(const void* a) { P11cObject* obj = (P11cObject*)a; unsigned int hash = p11c_hash_pointer(obj->obj_funcs); + hash ^= p11c_hash_integer((int)obj->slot); hash ^= (obj->obj_funcs->hash_object)(obj); return hash; } @@ -188,6 +189,8 @@ object_equal_func(const void* a, const void* b) P11cObject* cb = (P11cObject*)b; if(ca == cb) return 1; + if(ca->slot != cb->slot) + return 0; if(ca->obj_funcs != cb->obj_funcs) return 0; return (ca->obj_funcs->equal_object)(ca, cb); |