trusted-keys: additional TSS return code and other error handling
trusted-keys: additional TSS return code and other error handling

Previously not all TSS return codes were tested, as they were all eventually
caught by the TPM. Now all returns are tested and handled immediately.

This patch also fixes memory leaks in error and non-error paths.

Signed-off-by: David Safford <b026488042dc69ccdfe41169fd34eeca95df8391@watson.ibm.com>
Acked-by: Mimi Zohar <f02992f7c171053741caa6b515d9896745b37477@us.ibm.com>
Acked-by: David Howells <ebac1d06c1688626821bb0e574a037a7a5354e49@redhat.com>
Acked-by: Serge E. Hallyn <c9ddb6c25a8f77bd31ba26bb8332c4e1aa2c6778@hallyn.com>
Signed-off-by: James Morris <10d11de3abc355eabe955bb734f0f8e71da56e16@namei.org>

KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas