Fix crash in galeramon

An std::string was assigned a null value which will cause a crash.
This commit is contained in:
Markus Mäkelä 2019-01-04 12:00:48 +02:00
parent 2fde4ba1b3
commit 8c437c6440
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -208,9 +208,9 @@ void GaleraMonitor::update_server_status(MXS_MONITORED_SERVER* monitored_server)
info.local_state = atoi(row[1]);
}
if (strcmp(row[0], "wsrep_cluster_state_uuid") == 0)
if (strcmp(row[0], "wsrep_cluster_state_uuid") == 0 && row[1] && *row[1])
{
info.cluster_uuid = row[1] && *row[1] ? MXS_STRDUP(row[1]) : NULL;
info.cluster_uuid = row[1];
}
}