Fixed a linked list manipulation bug.
Consider the case where you start with A->B->C and you remove B. Before
this fix, both A and B were removed from the list. This resulted in a
dangling reference to A in the key manager and invalid key handle errors
when A was next referenced. Also this resulted in A not being evicted /
flushed from the TPM when Tspi_Key_UnloadKey was called.
TEST=Run the platform_Pkcs11Events autotest.
Reviewed-by: Gaurav Shah <email@example.com>
Tested-by: Darren Krahn <firstname.lastname@example.org>
Commit-Ready: Darren Krahn <email@example.com>
1 file changed