Policy sessions were not flushed if the policy session
was successfully executed but the command where the policy
was used for authorization was executed with an error.
For the session cleanup in error cases it will be tested
whethe the policy session still exists in the TPM.
Fixes: #2784
FAPI: Fix possible null pointer access in fapi crypto.
* In the cleanup function for an ossl hash context the variables
were not checked before calling the ossl cleanup functions.
* An unneded cast was removed.
TCTI device: Fix possible unmarshalling from uninitialized variable.
Ther was no else case in the receive function when the header
was not received but afterwards the partial_size was unmarshalled
from header. Now TSS2_TCTI_RC_GENERAL_FAILURE is returned in
this case.