From: Marc-AndrĂ© Lureau <[email protected]>

So it can eventually be called multiple times safely.

Signed-off-by: Marc-AndrĂ© Lureau <[email protected]>
Reviewed-by: Stefan Berger <[email protected]>
Message-Id: <[email protected]>
---
 backends/tpm/tpm_util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c
index a64e156f45..264bff22a9 100644
--- a/backends/tpm/tpm_util.c
+++ b/backends/tpm/tpm_util.c
@@ -72,6 +72,7 @@ static void release_tpm(Object *obj, const char *name, void 
*opaque)
 
     if (*be) {
         tpm_backend_reset(*be);
+        *be = NULL;
     }
 }
 
-- 
2.51.1


Reply via email to