File bsc#1128772-0001-Fix-libcrmcluster-avoid-use-of-NULL-when-searching-f.patch of Package pacemaker.13283
From ab6790e8fce4988baeb02cb0f5e7b3d65f10c473 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Mon, 11 Jun 2018 18:22:27 -0500
Subject: [PATCH] Fix: libcrmcluster: avoid use-of-NULL when searching for
remote node
---
lib/cluster/membership.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/cluster/membership.c b/lib/cluster/membership.c
index c3b7d894b..8978dcbb6 100644
--- a/lib/cluster/membership.c
+++ b/lib/cluster/membership.c
@@ -476,7 +476,7 @@ crm_find_peer_full(unsigned int id, const char *uname, int flags)
crm_peer_init();
- if (flags & CRM_GET_PEER_REMOTE) {
+ if ((uname != NULL) && (flags & CRM_GET_PEER_REMOTE)) {
node = g_hash_table_lookup(crm_remote_peer_cache, uname);
}
--
2.16.4