aboutsummaryrefslogtreecommitdiff
path: root/src/core/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/device.c')
-rw-r--r--src/core/device.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/device.c b/src/core/device.c
index 7a6fb479..815fafcc 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -51,6 +51,11 @@ device_fini(void *arg)
for (int i = 0; i < d->num_paths; i++) {
nni_aio_stop(&d->paths[i].aio);
}
+ for (int i = 0; i < d->num_paths; i++) {
+ nni_aio_fini(&d->paths[i].aio);
+ }
+ nni_sock_rele(d->paths[0].src);
+ nni_sock_rele(d->paths[0].dst);
NNI_FREE_STRUCT(d);
}
@@ -97,8 +102,6 @@ device_cb(void *arg)
nni_aio_finish_error(d->user, d->rv);
d->user = NULL;
}
- nni_sock_rele(d->paths[0].src);
- nni_sock_rele(d->paths[0].dst);
nni_reap(&device_reap, d);
}