File 0001-Low-controller-avoid-memory-leak-when-duplicate-moni.patch of Package pacemaker.12290

From 977e17f1377e30f53585beb0e82c652991942234 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Tue, 30 Apr 2019 09:24:47 -0500
Subject: [PATCH] Low: controller: avoid memory leak when duplicate monitor is
 scheduled

---
 daemons/controld/controld_remote_ra.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/daemons/controld/controld_remote_ra.c b/daemons/controld/controld_remote_ra.c
index 66a378807..097e93a46 100644
--- a/daemons/controld/controld_remote_ra.c
+++ b/daemons/controld/controld_remote_ra.c
@@ -1,5 +1,7 @@
 /*
- * Copyright 2013-2018 David Vossel <davidvossel@gmail.com>
+ * Copyright 2013-2019 the Pacemaker project contributors
+ *
+ * The version control history for this file may have further details.
  *
  * This source code is licensed under the GNU General Public License version 2
  * or later (GPLv2+) WITHOUT ANY WARRANTY.
@@ -1105,7 +1107,8 @@ remote_ra_exec(lrm_state_t *lrm_state, const char *rsc_id, const char *action,
 
     cmd = handle_dup_monitor(ra_data, interval_ms, userdata);
     if (cmd) {
-       return cmd->call_id;
+        rc = cmd->call_id;
+        goto exec_done;
     }
 
     cmd = calloc(1, sizeof(remote_ra_cmd_t));
-- 
2.16.4

openSUSE Build Service is sponsored by