From 94b9723917b8bf887c89e43f9cc0e35a94ca2fc4 Mon Sep 17 00:00:00 2001 From: thorkill Date: Tue, 30 Jun 2015 19:19:30 +0200 Subject: [PATCH] Initialize sock --- src/net_packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net_packet.c b/src/net_packet.c index 6183e253..0ff9f503 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -713,7 +713,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { /* Send the packet */ const sockaddr_t *sa = NULL; - int sock; + int sock = -1; if(n->status.send_locally) choose_local_address(n, &sa, &sock); @@ -795,7 +795,7 @@ bool send_sptps_data(node_t *to, node_t *from, int type, const void *data, size_ memcpy(buf_ptr, data, len); buf_ptr += len; const sockaddr_t *sa = NULL; - int sock; + int sock = -1; if(relay->status.send_locally) choose_local_address(relay, &sa, &sock); if(!sa)