X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fconnlist.c;h=b1e3146bc6732a35dcbde34929368a49aa89ed5b;hp=f1b0eba0aeca1a2b4796d3c71ac2dd8528cb20c2;hb=85adeef21275633b78a234b2660cbe3bc9dd2c33;hpb=97ce045189e330e121873d1b4be1959c60062cbb diff --git a/src/connlist.c b/src/connlist.c index f1b0eba0..b1e3146b 100644 --- a/src/connlist.c +++ b/src/connlist.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: connlist.c,v 1.1.2.3 2000/10/14 17:04:13 guus Exp $ + $Id: connlist.c,v 1.1.2.4 2000/10/15 00:59:34 guus Exp $ */ #include @@ -53,7 +53,7 @@ cp destroy_queue(p->sq); if(p->rq) destroy_queue(p->rq); - if(p->name) + if(p->name && p->name!=unknown) free(p->name); if(p->hostname) free(p->hostname); @@ -61,6 +61,8 @@ cp RSA_free(p->public_key); if(p->cipher_pktkey) free(p->cipher_pktkey); + if(p->buffer) + free(p->buffer); free(p); cp } @@ -214,7 +216,7 @@ int read_host_config(conn_list_t *cl) char *fname; int x; cp - asprintf(fname, "%s/hosts/%s", confbase, cl->name); + asprintf(&fname, "%s/hosts/%s", confbase, cl->name); x = read_config_file(&cl->config, fname); free(fname); cp