Blame SOURCES/096-digest-leak.patch

356a11
From a82c9726299044f4d9d0cfac6ed78a959db726c2 Mon Sep 17 00:00:00 2001
356a11
From: Ken Gaillot <kgaillot@redhat.com>
356a11
Date: Mon, 2 Oct 2017 15:51:31 -0500
356a11
Subject: [PATCH] Low: libpe_status: avoid memory leak in unfencing digests
356a11
356a11
---
356a11
 lib/pengine/utils.c | 10 ++++++----
356a11
 1 file changed, 6 insertions(+), 4 deletions(-)
356a11
356a11
diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c
356a11
index b58f05a..82b6809 100644
356a11
--- a/lib/pengine/utils.c
356a11
+++ b/lib/pengine/utils.c
356a11
@@ -2157,10 +2157,12 @@ pe_fence_op(node_t * node, const char *op, bool optional, const char *reason, pe
356a11
                     digests_secure+digests_secure_offset, max-digests_secure_offset,
356a11
                     "%s:%s:%s,", match->id, (const char*)g_hash_table_lookup(match->meta, XML_ATTR_TYPE), data->digest_secure_calc);
356a11
             }
356a11
-            add_hash_param(stonith_op->meta, strdup(XML_OP_ATTR_DIGESTS_ALL),
356a11
-                           digests_all);
356a11
-            add_hash_param(stonith_op->meta, strdup(XML_OP_ATTR_DIGESTS_SECURE),
356a11
-                           digests_secure);
356a11
+            g_hash_table_insert(stonith_op->meta,
356a11
+                                strdup(XML_OP_ATTR_DIGESTS_ALL),
356a11
+                                digests_all);
356a11
+            g_hash_table_insert(stonith_op->meta,
356a11
+                                strdup(XML_OP_ATTR_DIGESTS_SECURE),
356a11
+                                digests_secure);
356a11
         }
356a11
 
356a11
     } else {
356a11
-- 
356a11
1.8.3.1
356a11