From bcb047a7298f291a33f3268f9e765df330c22954 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 10 May 2018 12:23:15 +0930 Subject: [PATCH] gossipd: fix uninitialized var. We assert() that it's set by one of the branches (it should be!) but if we don't hit one it's uninitialized, not NULL. Signed-off-by: Rusty Russell --- gossipd/gossip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossipd/gossip.c b/gossipd/gossip.c index d00a2e6eb..2f5fffece 100644 --- a/gossipd/gossip.c +++ b/gossipd/gossip.c @@ -1897,7 +1897,7 @@ static void connect_failed(struct io_conn *conn, struct reaching *reach) static struct io_plan *conn_init(struct io_conn *conn, struct reaching *reach) { - struct addrinfo *ai; + struct addrinfo *ai = NULL; switch (reach->addr.itype) { case ADDR_INTERNAL_SOCKNAME: