Added NULL checks.

This commit is contained in:
Markus Makela
2015-08-21 17:42:03 +03:00
parent 8a362d6668
commit f014598d39

View File

@ -1588,6 +1588,13 @@ void check_drop_tmp_table(
return;
}
if(router_cli_ses->rses_master_ref == NULL)
{
skygw_log_write(LE,"[%s] Error: Master server reference is NULL.",
__FUNCTION__);
return;
}
rses_prop_tmp = router_cli_ses->rses_properties[RSES_PROP_TYPE_TMPTABLES];
master_dcb = router_cli_ses->rses_master_ref->bref_dcb;
@ -1673,6 +1680,13 @@ static skygw_query_type_t is_read_tmp_table(
return type;
}
if(router_cli_ses->rses_master_ref == NULL)
{
skygw_log_write(LE,"[%s] Error: Master server reference is NULL.",
__FUNCTION__);
return;
}
rses_prop_tmp = router_cli_ses->rses_properties[RSES_PROP_TYPE_TMPTABLES];
master_dcb = router_cli_ses->rses_master_ref->bref_dcb;
@ -1768,6 +1782,13 @@ static void check_create_tmp_table(
return;
}
if(router_cli_ses->rses_master_ref == NULL)
{
skygw_log_write(LE,"[%s] Error: Master server reference is NULL.",
__FUNCTION__);
return;
}
rses_prop_tmp = router_cli_ses->rses_properties[RSES_PROP_TYPE_TMPTABLES];
master_dcb = router_cli_ses->rses_master_ref->bref_dcb;