diff --git a/main/astobj2.c b/main/astobj2.c index 79e9d6526a..724bd53895 100644 --- a/main/astobj2.c +++ b/main/astobj2.c @@ -441,7 +441,7 @@ struct ao2_container *__ao2_container_alloc_debug(const unsigned int n_buckets, /* compute the container size */ const unsigned int num_buckets = hash_fn ? n_buckets : 1; size_t container_size = sizeof(struct ao2_container) + num_buckets * sizeof(struct bucket); - struct ao2_container *c = __ao2_alloc_debug(container_size, container_destruct_debug, tag, file, line, funcname, ref_debug); + struct ao2_container *c = __ao2_alloc_debug(container_size, ref_debug ? container_destruct_debug : container_destruct, tag, file, line, funcname, ref_debug); return internal_ao2_container_alloc(c, num_buckets, hash_fn, cmp_fn); }