From 3031e790d2e5869a775394e707b8ead8e588cb54 Mon Sep 17 00:00:00 2001 From: dormando Date: Tue, 23 Jul 2024 11:19:51 -0700 Subject: [PATCH] mcmc: upstream update fix fault if connecting to down servers (sometimes) --- vendor/mcmc/mcmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/mcmc/mcmc.c b/vendor/mcmc/mcmc.c index 902e704b5e..14923569aa 100644 --- a/vendor/mcmc/mcmc.c +++ b/vendor/mcmc/mcmc.c @@ -444,8 +444,8 @@ int mcmc_connect(void *c, char *host, char *port, int options) { int sock; int res = MCMC_CONNECTED; struct addrinfo hints; - struct addrinfo *ai; - struct addrinfo *next; + struct addrinfo *ai = NULL; + struct addrinfo *next = NULL; // Since our cx memory was likely malloc'ed, ensure we start clear. memset(ctx, 0, sizeof(mcmc_ctx_t));