diff --git a/main/pbx.c b/main/pbx.c index 029b68b8a5..d32994fe79 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -7823,7 +7823,7 @@ int ast_wrlock_contexts() int res = ast_rwlock_wrlock(&conlock); if (!res) ast_atomic_fetchadd_int(&conlock_wrlock_version, 1); - return ast_rwlock_wrlock(&conlock); + return res; } int ast_rdlock_contexts()