Commit c2c70200 authored by Mark Andrews's avatar Mark Andrews
Browse files

use sizeof(CK_SLOT_ID)

(cherry picked from commit 2c1d8b2e)
parent 353ed07b
......@@ -596,7 +596,7 @@ scan_slots(void) {
/* it's not an error if we didn't find any providers */
if (slotCount == 0)
return;
slotList = pk11_mem_get(sizeof(CK_SLOT_ID_PTR) * slotCount);
slotList = pk11_mem_get(sizeof(CK_SLOT_ID) * slotCount);
RUNTIME_CHECK(slotList != NULL);
PK11_FATALCHECK(pkcs_C_GetSlotList, (CK_FALSE, slotList, &slotCount));
......@@ -920,8 +920,9 @@ scan_slots(void) {
aes_token = token;
}
if (slotList != NULL)
pk11_mem_put(slotList, sizeof(CK_SLOT_ID_PTR) * slotCount);
if (slotList != NULL) {
pk11_mem_put(slotList, sizeof(CK_SLOT_ID) * slotCount);
}
}
CK_SLOT_ID
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment