diff --git a/main/pbx.c b/main/pbx.c index b9c8535..3a7c4c8 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -7912,6 +7912,7 @@ int ast_add_extension(const char *context, int replace, const char *extension, const char *application, void *data, void (*datad)(void *), const char *registrar) { int ret = -1; + ao2_lock(hints); struct ast_context *c = find_context_locked(context); if (c) { @@ -7920,6 +7921,7 @@ int ast_add_extension(const char *context, int replace, const char *extension, ast_unlock_contexts(); } + ao2_unlock(hints); return ret; }