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

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