File pacemaker#3517-0001-prevent-to-free-op_reply-repeatedly-in-stonith_send_.patch of Package pacemaker.36873

From be4f91c1745911556068d0cac0c03c799c723be8 Mon Sep 17 00:00:00 2001
From: tomyouyou <yxszyn@163.com>
Date: Thu, 6 Jun 2024 17:22:19 +0800
Subject: [PATCH] prevent to free 'op_reply' repeatedly in
 'stonith_send_command'

---
 lib/fencing/st_client.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/fencing/st_client.c b/lib/fencing/st_client.c
index 27ea86b5be..17f4766944 100644
--- a/lib/fencing/st_client.c
+++ b/lib/fencing/st_client.c
@@ -1639,12 +1639,14 @@ stonith_send_command(stonith_t * stonith, const char *op, xmlNode * data, xmlNod
         crm_err("Received bad reply: No id set");
         crm_log_xml_err(op_reply, "Bad reply");
         free_xml(op_reply);
+        op_reply = NULL;
         rc = -ENOMSG;
 
     } else {
         crm_err("Received bad reply: %d (wanted %d)", reply_id, stonith->call_id);
         crm_log_xml_err(op_reply, "Old reply");
         free_xml(op_reply);
+        op_reply = NULL;
         rc = -ENOMSG;
     }
 
-- 
2.35.3

openSUSE Build Service is sponsored by