From 319c2bf1b2886b2e5cd1c5d60a8950493d2d4d75 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 8 Mar 2011 10:51:41 +0100 Subject: Crash bug. Zap a double free. The config object owns peer.secret so don't free it. --- lib/radsec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/radsec.c b/lib/radsec.c index afb871e..b771dc8 100644 --- a/lib/radsec.c +++ b/lib/radsec.c @@ -114,14 +114,14 @@ _rs_peer_destroy (struct rs_peer *p) assert (p); assert (p->conn); assert (p->conn->ctx); - /* NOTE: The peer object doesn't own its connection (conn). */ + /* NOTE: The peer object doesn't own its connection (conn), nor its + realm. */ + /* NOTE: secret is owned by config object. */ if (p->addr) { evutil_freeaddrinfo (p->addr); p->addr = NULL; } - if (p->secret) - rs_free (p->conn->ctx, p->secret); rs_free (p->conn->ctx, p); } -- cgit v1.1