From 8e6ec7d5462ed551fc03889fc69c2fbca391ae5f Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 31 May 2023 16:37:58 +1000 Subject: [PATCH] Fix null string warning. --- src/generator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index f459aedc..83ff0ac9 100644 --- a/src/generator.c +++ b/src/generator.c @@ -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) {