diff --git a/main/pbx.c b/main/pbx.c index 86b4c0454a5551c47e6d8e0bbffca22b89cb1641..cc14ba2eb13db9f742945583a407fa9f6275bbd6 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -7227,6 +7227,8 @@ void __ast_context_destroy(struct ast_context *list, struct ast_hashtab *context ready to let it go as soon as we locked it. */ ast_unlock_context(tmp); __ast_internal_context_destroy(tmp); + } else { + ast_unlock_context(tmp); } } else if (con) { ast_verb(3, "Deleting context %s registrar=%s\n", tmp->name, tmp->registrar);