diff options
author | Linus Nordberg <linus@nordu.net> | 2011-03-08 10:51:41 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-03-08 10:51:41 +0100 |
commit | 319c2bf1b2886b2e5cd1c5d60a8950493d2d4d75 (patch) | |
tree | 1eb683e8e82ac22e3fa1c2c48745bccb8324ab8d /lib | |
parent | 4357104b4e1fa5db7490b546cb6f39c0b77f0881 (diff) |
Crash bug. Zap a double free.
The config object owns peer.secret so don't free it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/radsec.c | 6 |
1 files 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); } |