diff options
Diffstat (limited to 'lib/radsec.c')
-rw-r--r-- | lib/radsec.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/radsec.c b/lib/radsec.c index 7421755..347a48b 100644 --- a/lib/radsec.c +++ b/lib/radsec.c @@ -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); } |