Blame SOURCES/0005-ResourceManager-Avoid-double-free-in-resource-manage.patch

cbf305
From a97e07d5a5947f5749e4ea25d0f538eeee8997bb Mon Sep 17 00:00:00 2001
cbf305
From: Jerry Snitselaar <jsnitsel@redhat.com>
cbf305
Date: Mon, 23 Nov 2020 11:45:31 -0700
cbf305
Subject: [PATCH 5/6] ResourceManager: Avoid double free in resource-manager.c
cbf305
cbf305
Clean up potential double free found by coverity in
cbf305
resource_manager_load_session_from_handle. If flush_session has been
cbf305
called, don't call session_list_remove which is already called in
cbf305
flush_session.
cbf305
cbf305
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
cbf305
---
cbf305
 src/resource-manager.c | 1 +
cbf305
 1 file changed, 1 insertion(+)
cbf305
cbf305
diff --git a/src/resource-manager.c b/src/resource-manager.c
cbf305
index 050436f..556184b 100644
cbf305
--- a/src/resource-manager.c
cbf305
+++ b/src/resource-manager.c
cbf305
@@ -239,6 +239,7 @@ resource_manager_load_session_from_handle (ResourceManager *resmgr,
cbf305
         rc = tpm2_response_get_code (response);
cbf305
         if (rc != TSS2_RC_SUCCESS) {
cbf305
             flush_session (resmgr, session_entry);
cbf305
+            goto out;
cbf305
         }
cbf305
     }
cbf305
     if (will_flush) {
cbf305
-- 
cbf305
2.34.3
cbf305