Fix null string warning.

This commit is contained in:
Con Kolivas 2023-05-31 16:37:58 +10:00
parent 1f7344f193
commit 8e6ec7d546

View File

@ -230,11 +230,12 @@ static bool server_alive(ckpool_t *ckp, server_instance_t *si, bool pinging)
realloc_strcat(&userpass, si->pass);
dealloc(cs->auth);
cs->auth = http_base64(userpass);
dealloc(userpass);
if (!cs->auth) {
LOGWARNING("Failed to create base64 auth from %s", userpass);
dealloc(userpass);
return ret;
}
dealloc(userpass);
fd = connect_socket(cs->url, cs->port);
if (fd < 0) {