X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=lib%2Fradsec.c;h=d14ad5057c39b6359fb7d099997c689b64b6b101;hb=937144b230752ac640e611cabb57387f613997bc;hp=7421755593add9ce87df2f573ea9ca40740c113b;hpb=3fd136cdbc85ddff5ed0a5953ee1827b9a948748;p=libradsec.git diff --git a/lib/radsec.c b/lib/radsec.c index 7421755..d14ad50 100644 --- a/lib/radsec.c +++ b/lib/radsec.c @@ -1,5 +1,5 @@ /* Copyright 2010, 2011 NORDUnet A/S. All rights reserved. - See the file COPYING for licensing information. */ + See LICENSE for licensing information. */ #if defined HAVE_CONFIG_H #include @@ -49,10 +49,10 @@ rs_context_create (struct rs_context **ctx) } struct rs_error * -rs_resolv (struct evutil_addrinfo **addr, - rs_conn_type_t type, - const char *hostname, - const char *service) +rs_resolve (struct evutil_addrinfo **addr, + rs_conn_type_t type, + const char *hostname, + const char *service) { int err; struct evutil_addrinfo hints, *res = NULL; @@ -102,12 +102,16 @@ rs_context_destroy (struct rs_context *ctx) for (p = r->peers; p; ) { struct rs_peer *tmp = p; - if (p->addr) - evutil_freeaddrinfo (p->addr); + if (p->addr_cache) + { + evutil_freeaddrinfo (p->addr_cache); + p->addr_cache = NULL; + } p = p->next; rs_free (ctx, tmp); } free (r->name); + rs_free (ctx, r->transport_cred); r = r->next; rs_free (ctx, tmp); }