File bsc#1211678-0001-Test-libpe_rules-libcrmcommon-Free-the-whole-xml-doc.patch of Package pacemaker.29826

From 4d41ff88e4def0a4129c79c9e478efacd71c24c6 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Mon, 25 Jan 2021 11:04:57 -0500
Subject: [PATCH 1/6] Test: libpe_rules, libcrmcommon: Free the whole xml doc,
 not just the node.

---
 lib/common/output_xml.c                               |  2 +-
 .../tests/rules/pe_cron_range_satisfied.c        | 11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

Index: pacemaker-2.0.4+20200616.2deceaa3a/lib/common/output_xml.c
===================================================================
--- pacemaker-2.0.4+20200616.2deceaa3a.orig/lib/common/output_xml.c
+++ pacemaker-2.0.4+20200616.2deceaa3a/lib/common/output_xml.c
@@ -50,7 +50,7 @@ xml_free_priv(pcmk__output_t *out) {
         return;
     }
 
-    xmlFreeNode(priv->root);
+    free_xml(priv->root);
     g_queue_free(priv->parent_q);
     g_slist_free(priv->errors);
     free(priv);
Index: pacemaker-2.0.4+20200616.2deceaa3a/lib/pengine/tests/rules/pe_cron_range_satisfied.c
===================================================================
--- pacemaker-2.0.4+20200616.2deceaa3a.orig/lib/pengine/tests/rules/pe_cron_range_satisfied.c
+++ pacemaker-2.0.4+20200616.2deceaa3a/lib/pengine/tests/rules/pe_cron_range_satisfied.c
@@ -1,3 +1,12 @@
+/*
+ * Copyright 2020-2021 the Pacemaker project contributors
+ *
+ * The version control history for this file may have further details.
+ *
+ * This source code is licensed under the GNU Lesser General Public License
+ * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
+ */
+
 #include <glib.h>
 
 #include <crm/common/xml.h>
@@ -11,7 +20,7 @@ run_one_test(const char *t, const char *
     g_assert_cmpint(pe_cron_range_satisfied(tm, xml), ==, expected);
 
     crm_time_free(tm);
-    xmlFreeNode(xml);
+    free_xml(xml);
 }
 
 static void
openSUSE Build Service is sponsored by