The previous implementation did not destroy filters that were not used by services. With the full initialization of filters in filter_alloc, we can simply traverse the list of created filters and destroy them knowing that they are all valid.