diff --git a/ompi/class/ompi_free_list.c b/ompi/class/ompi_free_list.c index 3ce0a8f135..3f2037cd94 100644 --- a/ompi/class/ompi_free_list.c +++ b/ompi/class/ompi_free_list.c @@ -76,6 +76,12 @@ static void ompi_free_list_destruct(ompi_free_list_t* fl) fl->fl_mpool->mpool_free(fl->fl_mpool, fl_mem->ptr, fl_mem->registration); + /* destruct the item (we constructed it), then free the memory chunk */ + OBJ_DESTRUCT(item); + free(item); + } + } else { + while(NULL != (item = opal_list_remove_first(&(fl->fl_allocations)))) { /* destruct the item (we constructed it), then free the memory chunk */ OBJ_DESTRUCT(item); free(item);