diff options
author | Linus Nordberg <linus@nordu.net> | 2011-03-01 01:00:47 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-03-01 01:00:47 +0100 |
commit | 58dc2b3ab4c8dccde97632d1a2d27ba8e6b9c52a (patch) | |
tree | 5bb18f1d20179a85934dc6308c3970831b53744b /lib/conn.c | |
parent | f762125c8296407c918e75c90f30166d7e546b11 (diff) |
Don't have the connection freeing peers -- it's the contexts responsibility.
Also, let _rs_peer_destroy() free secret.
Diffstat (limited to 'lib/conn.c')
-rw-r--r-- | lib/conn.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -123,7 +123,6 @@ rs_conn_disconnect (struct rs_connection *conn) int rs_conn_destroy (struct rs_connection *conn) { - struct rs_peer *p; int err = 0; assert (conn); @@ -136,14 +135,7 @@ rs_conn_destroy (struct rs_connection *conn) } /* NOTE: conn->realm is owned by context. */ - - for (p = conn->peers; p; p = p->next) - { - if (p->addr) - evutil_freeaddrinfo (p->addr); - if (p->secret) - rs_free (conn->ctx, p->secret); - } + /* NOTE: conn->peers is owned by context. */ if (conn->tev) event_free (conn->tev); |