File 0001-Fix-scheduler-avoid-double-free-with-disabled-recurr.patch of Package pacemaker.38493
From c0fd09fba193ec1fe35cb3673ce5a7876cbfbe32 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Tue, 24 Oct 2023 16:21:40 -0500
Subject: [PATCH] Fix: scheduler: avoid double free with disabled recurring
actions
Before 413ec356, memory for a disabled recurring action's key was leaked. After
413ec356, it was freed but not NULLed, leading to a double free. Now, it's
freed and NULLed.
---
lib/pacemaker/pcmk_sched_recurring.c | 1 +
1 file changed, 1 insertion(+)
Index: pacemaker-2.1.5+20221208.a3f44794f/lib/pacemaker/pcmk_sched_recurring.c
===================================================================
--- pacemaker-2.1.5+20221208.a3f44794f.orig/lib/pacemaker/pcmk_sched_recurring.c
+++ pacemaker-2.1.5+20221208.a3f44794f/lib/pacemaker/pcmk_sched_recurring.c
@@ -166,6 +166,7 @@ is_recurring_history(const pe_resource_t
crm_trace("Not creating recurring action %s for disabled resource %s",
op->id, rsc->id);
free(op->key);
+ op->key = NULL;
return false;
}