tpm-passthrough: make it safer to destroy after creation
commit8df4d8484f607d4973e66e93f2eba0b3f80c4238
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 6 Nov 2017 18:39:10 +0000 (6 19:39 +0100)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Fri, 15 Dec 2017 04:39:14 +0000 (14 23:39 -0500)
treef61c3ebad761b94a36d4c62186ef376c4c34f38f
parent9f7c0ef2ffa02b3bf6bc630496b8df67c750edd3
tpm-passthrough: make it safer to destroy after creation

Check fds values before closing, to avoid close(-1).

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_passthrough.c