diff --git a/bin/plugins/filter-aaaa.c b/bin/plugins/filter-aaaa.c index 838fb7aefa..e62dff59af 100644 --- a/bin/plugins/filter-aaaa.c +++ b/bin/plugins/filter-aaaa.c @@ -83,6 +83,7 @@ typedef struct filter_instance { * Memory pool for use with persistent data. */ isc_mempool_t *datapool; + isc_mutex_t plock; /* * Hash table associating a client object with its persistent data. @@ -388,6 +389,8 @@ plugin_register(const char *parameters, */ isc_mempool_setfillcount(inst->datapool, 1024); isc_mempool_setfreemax(inst->datapool, UINT_MAX); + isc_mutex_init(&inst->plock); + isc_mempool_associatelock(inst->datapool, &inst->plock); /* * Set hook points in the view's hooktable. @@ -446,6 +449,7 @@ plugin_destroy(void **instp) { } if (inst->datapool != NULL) { isc_mempool_destroy(&inst->datapool); + isc_mutex_destroy(&inst->plock); } if (inst->aaaa_acl != NULL) { dns_acl_detach(&inst->aaaa_acl);