diff options
Diffstat (limited to 'helper')
-rw-r--r-- | helper/Makefile.am | 2 | ||||
-rw-r--r-- | helper/cuckootable.c | 8 | ||||
-rw-r--r-- | helper/iplookuptable.c | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/helper/Makefile.am b/helper/Makefile.am index 762f80602..8347ff96d 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -62,6 +62,6 @@ __LIB__libodphelper_la_SOURCES += \ linux/thread.c endif -__LIB__libodphelper_la_LIBADD = $(PTHREAD_LIBS) $(LIB)/libodp-linux.la +__LIB__libodphelper_la_LIBADD = $(PTHREAD_LIBS) lib_LTLIBRARIES = $(LIB)/libodphelper.la diff --git a/helper/cuckootable.c b/helper/cuckootable.c index 237c2f297..47dd90b6c 100644 --- a/helper/cuckootable.c +++ b/helper/cuckootable.c @@ -260,7 +260,11 @@ odph_cuckoo_table_create( pool = odp_pool_lookup(pool_name); if (pool != ODP_POOL_INVALID) - odp_pool_destroy(pool); + if (odp_pool_destroy(pool)) { + odp_shm_free(shm_tbl); + ODPH_DBG("failed to destroy pre-existing pool\n"); + return NULL; + } odp_pool_param_init(¶m); param.type = ODP_POOL_BUFFER; @@ -285,7 +289,7 @@ odph_cuckoo_table_create( queue = odp_queue_create(queue_name, &qparam); if (queue == ODP_QUEUE_INVALID) { ODPH_DBG("failed to create free_slots queue\n"); - odp_pool_destroy(pool); + (void)odp_pool_destroy(pool); odp_shm_free(shm_tbl); return NULL; } diff --git a/helper/iplookuptable.c b/helper/iplookuptable.c index c02ee5415..eacfcf5f8 100644 --- a/helper/iplookuptable.c +++ b/helper/iplookuptable.c @@ -150,7 +150,7 @@ cache_destroy(odph_iplookup_table_impl *impl) sprintf( pool_name, "%s_%d_%d", impl->name, i, count); - odp_pool_destroy(odp_pool_lookup(pool_name)); + (void)odp_pool_destroy(odp_pool_lookup(pool_name)); } } } |