Blame SOURCES/0009-EP11-Fix-memory-leak-introduced-with-recent-commit.patch

971d89
From b17570340533d36db1782e5aeafc9107c607b7c4 Mon Sep 17 00:00:00 2001
971d89
From: Ingo Franzki <ifranzki@linux.ibm.com>
971d89
Date: Mon, 7 Nov 2022 14:04:01 +0100
971d89
Subject: [PATCH 09/34] EP11: Fix memory leak introduced with recent commit
971d89
971d89
Function publ_key_get_spki() allocates the SPKI buffer, so it must be freed
971d89
afterwards.
971d89
971d89
Fixes: 638fa126c8cb28ff7daf2bb383a0461c8f9fe6f8
971d89
971d89
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
971d89
---
971d89
 usr/lib/ep11_stdll/ep11_specific.c | 2 ++
971d89
 1 file changed, 2 insertions(+)
971d89
971d89
diff --git a/usr/lib/ep11_stdll/ep11_specific.c b/usr/lib/ep11_stdll/ep11_specific.c
971d89
index 3b14a557..9e320503 100644
971d89
--- a/usr/lib/ep11_stdll/ep11_specific.c
971d89
+++ b/usr/lib/ep11_stdll/ep11_specific.c
971d89
@@ -5452,6 +5452,8 @@ error:
971d89
         free(chk_attr);
971d89
     if (spki_attr != NULL)
971d89
         free(spki_attr);
971d89
+    if (spki != NULL)
971d89
+        free(spki);
971d89
     if (new_attrs)
971d89
         free_attribute_array(new_attrs, new_attrs_len);
971d89
     if (new_attrs1)
971d89
-- 
971d89
2.16.2.windows.1
971d89