Skip to content

Commit

Permalink
Sigh
Browse files Browse the repository at this point in the history
Revert things a bit, do it properly now. I hope.
  • Loading branch information
yoe committed Aug 22, 2019
1 parent a83a041 commit 9e39a79
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/unit/testlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,11 +663,13 @@ int find_slot(CK_BBOOL with_token, CK_SLOT_ID_PTR slot) {
count=1;
}

check_rv_long(C_GetSlotList(with_token, list, &count), m);
do {
rv = C_GetSlotList(with_token, list, &count);
check_rv_late_long("C_GetSlotList", m);
list = (CK_SLOT_ID_PTR)realloc(list, sizeof(CK_SLOT_ID) * count);
} while(rv == CKR_BUFFER_TOO_SMALL);
} while((rv = C_GetSlotList(with_token, list, &count)) == CKR_BUFFER_TOO_SMALL);

verbose_assert((count > 0 && list != NULL) || (count == 0 && list == NULL));

#undef CHECK_RV_DEALLOC
#define CHECK_RV_DEALLOC free(list)

Expand Down

0 comments on commit 9e39a79

Please sign in to comment.