From c33e17db31dc233cb6ba5c3eafedf92402f16dc2 Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Fri, 19 Dec 2014 14:05:56 +0200 Subject: [PATCH] Fix to NULL reference --- server/modules/routing/readwritesplit/readwritesplit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index 8a2e6e51f..2d346c1d6 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -4761,6 +4761,8 @@ static int router_handle_state_switch( bref = (backend_ref_t *)data; CHK_BACKEND_REF(bref); + srv = bref->bref_backend->backend_server; + LOGIF(LD, (skygw_log_write(LOGFILE_DEBUG, "%lu [router_handle_state_switch] %s %s:%d in state %s", pthread_self(), @@ -4769,8 +4771,6 @@ static int router_handle_state_switch( srv->port, STRSRVSTATUS(srv)))); - srv = bref->bref_backend->backend_server; - if (SERVER_IS_RUNNING(srv) && SERVER_IS_IN_CLUSTER(srv)) { goto return_rc;