OSDN Git Service

tpm-emulator: fix error handling
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 9 Oct 2017 22:55:56 +0000 (00:55 +0200)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Thu, 19 Oct 2017 15:42:28 +0000 (11:42 -0400)
commitc106ede9c85bf4b38c52dbee96b00c2aa0a97dee
tree0659466edcc05950d5b4e8628cecc1184e82b68e
parent0e43b7e61ce677e154584523943c1651779baccf
tpm-emulator: fix error handling

The previous patch cleaned up a bit error handling, and exposed an
existing bug: error_report_err() could be called with a NULL error.
Instead, make tpm_emulator_set_locality() set the error.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
hw/tpm/tpm_emulator.c