Blame SOURCES/0001-tools-tpm2_nvreadpublic-Fix-resource-leak.patch

cecfa4
From 023ec5c0eafe8dfb5b71e400cb0c2c337fb8c108 Mon Sep 17 00:00:00 2001
cecfa4
From: Imran Desai <imran.desai@intel.com>
cecfa4
Date: Sun, 29 Mar 2020 10:49:12 -0700
cecfa4
Subject: [PATCH] tools/tpm2_nvreadpublic: Fix resource leak
cecfa4
cecfa4
Signed-off-by: Imran Desai <imran.desai@intel.com>
cecfa4
---
cecfa4
 tools/tpm2_nvreadpublic.c | 1 +
cecfa4
 1 file changed, 1 insertion(+)
cecfa4
cecfa4
diff --git a/tools/tpm2_nvreadpublic.c b/tools/tpm2_nvreadpublic.c
cecfa4
index 7f8e46cbf863..eca1fd715a79 100644
cecfa4
--- a/tools/tpm2_nvreadpublic.c
cecfa4
+++ b/tools/tpm2_nvreadpublic.c
cecfa4
@@ -41,6 +41,7 @@ static tool_rc print_nv_public(ESYS_CONTEXT *context, TPMI_RH_NV_INDEX index, TP
cecfa4
     rc = tpm2_tr_get_name(context, tr_handle,
cecfa4
             &name);
cecfa4
     if (rc != tool_rc_success) {
cecfa4
+        free(attrs);
cecfa4
         return rc;
cecfa4
     }
cecfa4
 
cecfa4
-- 
cecfa4
2.31.0
cecfa4