Trousers: Fix wrong continuation after errors

This fixes the error handling in several Trousers functions,
where several execution branches forgot to jump to the exit
after an error occurs.

It seems that in the end the error was actually returned, but
before that some additional operations could be made. So the
severity of the bug depends on that. For instance, in
RPC_OwnerReadInternalPub_TP() that could result in a malloc()
call with an uninitialized variable passed as size.

Affected functions:
* RPC_ActivateTPMIdentity_TP,
* RPC_CreateMaintenanceArchive_TP,
* RPC_GetCapabilityOwner_TP,
* RPC_KeyControlOwner_TP,
* RPC_LoadKeyByBlob_TP,
* RPC_OwnerReadInternalPub_TP,
* RPC_OwnerReadPubek_TP.

BUG=chromium:808001
TEST=none (relying on existing tests)

Change-Id: Ia24152c597bf144ed7f1b5468c61779ae7128003
Reviewed-on: https://chromium-review.googlesource.com/897646
Commit-Ready: Maksim Ivanov <emaxx@chromium.org>
Tested-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
5 files changed