diff --git a/main/astobj2_container.c b/main/astobj2_container.c index 9bea58f74d9c15c207de127d1b31523e0f191c17..51978674e11b7159a39b7bbe15cd10fa821be1cf 100644 --- a/main/astobj2_container.c +++ b/main/astobj2_container.c @@ -718,6 +718,9 @@ struct ao2_container *__ao2_container_clone(struct ao2_container *orig, enum sea return NULL; } + /* This test is correct. clone must be locked before calling + * ao2_container_dup when the OBJ_NOLOCK flag is set, otherwise + * we could have errors in __adjust_lock. */ if (flags & OBJ_NOLOCK) { ao2_wrlock(clone); }