diff options
author | Stef Walter <stef@memberwebs.com> | 2008-12-09 18:49:32 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-12-09 18:49:32 +0000 |
commit | f22ca594d066f305c5c289dc522b2a13917234d0 (patch) | |
tree | 06d600f21058c5149b66b55d1dfe21217c55f21f /ckcapi-builtin.c | |
parent | 94c63a237d77654bab2ea34146b06fd4b0acfc99 (diff) |
Fix a particularly nasty bug in the hash tables, where an old would continue to get used when the value was replaced. Also a bunch of memory allocation tuning.
Diffstat (limited to 'ckcapi-builtin.c')
-rw-r--r-- | ckcapi-builtin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ckcapi-builtin.c b/ckcapi-builtin.c index 21115a3..7bfc0a0 100644 --- a/ckcapi-builtin.c +++ b/ckcapi-builtin.c @@ -134,7 +134,7 @@ builtin_load_data(CkCapiSession* sess, CkCapiObject* obj, CkCapiObjectData** obj ASSERT(objdata); ASSERT(num_builtins > 0); - bdata = (BuiltinObjectData*)calloc(sizeof(BuiltinObjectData), 1); + bdata = (BuiltinObjectData*)calloc(1, sizeof(BuiltinObjectData)); if(!bdata) return CKR_HOST_MEMORY; @@ -181,7 +181,7 @@ register_builtin_object(CkCapiSession* sess, CK_ATTRIBUTE_PTR attr, CkCapiObject BuiltinObject* bobj; CK_RV ret; - bobj = calloc(sizeof(BuiltinObject), 1); + bobj = calloc(1, sizeof(BuiltinObject)); if(!bobj) return CKR_HOST_MEMORY; |