]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
use sizeof(CK_SLOT_ID)
authorMark Andrews <marka@isc.org>
Thu, 2 Aug 2018 04:49:31 +0000 (14:49 +1000)
committerMark Andrews <marka@isc.org>
Fri, 24 Aug 2018 01:33:12 +0000 (11:33 +1000)
(cherry picked from commit 2c1d8b2e998abc965edf62e470001365ec7b2cde)

lib/isc/pk11.c

index 9b6f6eedc9d95091fc363f073843d9e809ab1c7e..c5d2310e411f65165668894479f17e90cc0e37a3 100644 (file)
@@ -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