On refreshing slots, there were two issues:
- When reusing a PKCS11_SLOT_PRIVATE structure instance, the instance to
be reused was accidentally freed
- Looking for an instance in the list of slots had bugs in pointer
usage.
Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com>
(cherry picked from commit a3210031d7e7cee882d02d68194e94018bd5ab6e)