[PATCH master] security:trusted_tpm2: Fix memory leak in tpm2_key_encode()