From 58f7363afa1960bbee1fa03f3d24db3b2a66cda8 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 8 Aug 2014 10:01:39 +0200 Subject: [PATCH] Make sure outgoing->mesh is set. This caused a segmentation fault when cancelling outgoing connections. --- src/net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net.c b/src/net.c index 20b799ff..b368e505 100644 --- a/src/net.c +++ b/src/net.c @@ -160,6 +160,7 @@ static void cond_add_connection(meshlink_handle_t *mesh, int rand_modulo, bool ( //the user will read this debug message "Autoconnecting to %s" that is misleading logger(DEBUG_CONNECTIONS, LOG_INFO, "Autoconnecting to %s", n->name); outgoing_t *outgoing = xzalloc(sizeof *outgoing); + outgoing->mesh = mesh; outgoing->name = xstrdup(n->name); list_insert_tail(mesh->outgoings, outgoing); setup_outgoing_connection(mesh, outgoing); -- 2.39.5