diff --git a/pbx.c b/pbx.c
index 620b7dc384253aa38e6718af444ef505b97d6b7a..2b4ceea1e8b239d4c4b42fe05f4743ccab22eda0 100644
--- a/pbx.c
+++ b/pbx.c
@@ -3426,7 +3426,6 @@ struct ast_context *ast_context_create(struct ast_context **extcontexts, const c
 
 	for (tmp = *local_contexts; tmp; tmp = tmp->next) {
 		if (!strcasecmp(tmp->name, name)) {
-			ast_mutex_unlock(&conlock);
 			ast_log(LOG_WARNING, "Tried to register context '%s', already in use\n", name);
 			if (!extcontexts)
 				ast_mutex_unlock(&conlock);