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

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