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

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