aboutsummaryrefslogtreecommitdiffstats
path: root/libaxl_detach.c
diff options
context:
space:
mode:
Diffstat (limited to 'libaxl_detach.c')
-rw-r--r--libaxl_detach.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libaxl_detach.c b/libaxl_detach.c
index c4a0a21..72343a9 100644
--- a/libaxl_detach.c
+++ b/libaxl_detach.c
@@ -6,11 +6,16 @@ libaxl_detach(LIBAXL_CONNECTION *conn)
{
int fd = conn->fd;
LIBAXL_CONTEXT *ctx;
+ struct id_pool *pool, *next_pool;
while (conn->pending_out) {
ctx = conn->pending_out;
conn->pending_out = ctx->next_pending_out;
libaxl_context_free(ctx);
}
+ for (pool = atomic_load(&conn->xid_pool); pool; pool = next_pool) {
+ next_pool = pool->next;
+ free(pool);
+ }
free(conn->in_buf);
free(conn->info_buf);
free(conn);