X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_socket.c;h=753229b4fd01e90887e45118b0965697ab28c65c;hp=149b0d3b2ecba9a17e5cd2d5e8ffd8d544a4372a;hb=a36259435c17f76cf12476234a56f40fcd8faf41;hpb=f0cf4991e2bd0e618c7020511fb12cb0b5c59a40 diff --git a/src/net_socket.c b/src/net_socket.c index 149b0d3b..753229b4 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -1,7 +1,7 @@ /* net_socket.c -- Handle various kinds of sockets. Copyright (C) 1998-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2007 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -300,7 +300,8 @@ begin: } if(!c->outgoing->aip) { - freeaddrinfo(c->outgoing->ai); + if(c->outgoing->ai) + freeaddrinfo(c->outgoing->ai); c->outgoing->ai = NULL; goto begin; } @@ -424,7 +425,7 @@ bool handle_new_meta_connection(int sock) sockaddrunmap(&sa); c = new_connection(); - c->name = NULL; + c->name = xstrdup(""); c->outcipher = myself->connection->outcipher; c->outdigest = myself->connection->outdigest; c->outmaclength = myself->connection->outmaclength;