Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=52816e6e75e47f... Commit: 52816e6e75e47f23414afde26bdce2f0d6f21feb Parent: abd0d212698ca681e42d3d2869fc728d1908f346 Author: Ryan McCabe rmccabe@redhat.com AuthorDate: Mon Jun 6 11:26:53 2016 -0400 Committer: Ryan McCabe rmccabe@redhat.com CommitterDate: Mon Jun 6 11:26:53 2016 -0400
rgmanager: Check for NULL when attempting to access the member list
Check that the membership list is not NULL before accessing it while sending state information. This can happen during very shortly after startup if modclusterd is running and sends a clustat command before initialization is complete.
Resolves: rhbz#1228170 Signed-off-by: Ryan McCabe rmccabe@redhat.com --- rgmanager/src/daemons/main.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c index 3679d57..127015b 100644 --- a/rgmanager/src/daemons/main.c +++ b/rgmanager/src/daemons/main.c @@ -77,6 +77,9 @@ send_node_states(msgctx_t *ctx) generic_msg_hdr hdr; cluster_member_list_t *ml = member_list();
+ if (!ml) + return; + master.m_nodeid = 0; event_master_info_cached(&master);
cluster-commits@lists.fedorahosted.org