File pacemaker-libcrmcommon-avoid-memory-leak-on-failed-IPC-send.patch of Package pacemaker.12462

commit 5e04e0d44781efd47cd1c13fb60d83a09f20b011
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Sun Apr 29 23:40:11 2018 -0500

    Low: libcrmcommon: avoid memory leak on failed IPC send

diff --git a/lib/common/ipc.c b/lib/common/ipc.c
index 3b6d285f4..2c933315f 100644
--- a/lib/common/ipc.c
+++ b/lib/common/ipc.c
@@ -577,6 +577,8 @@ crm_ipcs_flush_events(crm_client_t * c)
 
         rc = qb_ipcs_event_sendv(c->ipcs, event, 2);
         if (rc < 0) {
+            // The event didn't get sent, so put it back
+            g_queue_push_head(c->event_queue, event);
             break;
         }
 
openSUSE Build Service is sponsored by