File pacemaker-attrd-exit-crash.patch of Package pacemaker.3577

commit f9a61522456ac94ddd160e88371979f7996eaff6
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Wed Mar 16 17:56:51 2016 -0500

    Fix: attrd: crash on exit if initialization fails
    
    Patch supplied by Vladislav Bogdanov <bubble@hoster-ok.com>
    on the users@clusterlabs.org mailing list on 2015-10-12

diff --git a/attrd/main.c b/attrd/main.c
index 0198396..31e5317 100644
--- a/attrd/main.c
+++ b/attrd/main.c
@@ -374,8 +374,10 @@ main(int argc, char **argv)
 
     election_fini(writer);
     crm_client_disconnect_all(ipcs);
-    qb_ipcs_destroy(ipcs);
-    g_hash_table_destroy(attributes);
+    if (ipcs) {
+        qb_ipcs_destroy(ipcs);
+        g_hash_table_destroy(attributes);
+    }
 
     if (the_cib) {
         the_cib->cmds->signoff(the_cib);
openSUSE Build Service is sponsored by