diff options
Diffstat (limited to 'src/lib/cdap.c')
-rw-r--r-- | src/lib/cdap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/cdap.c b/src/lib/cdap.c index 441f7e44..4599fd8b 100644 --- a/src/lib/cdap.c +++ b/src/lib/cdap.c @@ -212,6 +212,7 @@ struct cdap * cdap_create(struct cdap_ops * ops, } instance->ops = ops; + instance->fd = fd; instance->ids = bmp_create(IDS_SIZE, 0); if (instance->ids == NULL) { @@ -234,6 +235,9 @@ int cdap_destroy(struct cdap * instance) pthread_cancel(instance->reader); + if (flow_dealloc(instance->fd)) + return -1; + pthread_mutex_lock(&instance->ids_lock); bmp_destroy(instance->ids); |