fixed bad memory allocation

This commit is contained in:
Frank Morgner 2015-01-24 20:11:16 +01:00
parent 9a4b58800b
commit 3f64d3a805
1 changed files with 1 additions and 1 deletions

View File

@ -2836,7 +2836,7 @@ get_mechanisms(CK_SLOT_ID slot, CK_MECHANISM_TYPE_PTR *pList, CK_FLAGS flags)
CK_RV rv;
rv = p11->C_GetMechanismList(slot, *pList, &ulCount);
*pList = calloc(ulCount, sizeof(*pList));
*pList = calloc(ulCount, sizeof(**pList));
if (*pList == NULL)
util_fatal("calloc failed: %m");