diff --git a/res/res_pjsip_history.c b/res/res_pjsip_history.c
index ed374d605b12b6e855666da51ef9a86e93530db2..d6b3eebe9b777bcc2948da49012b178126ff5b30 100644
--- a/res/res_pjsip_history.c
+++ b/res/res_pjsip_history.c
@@ -1280,7 +1280,7 @@ static char *pjsip_show_history(struct ast_cli_entry *e, int cmd, struct ast_cli
 		}
 		entry = ao2_bump(AST_VECTOR_GET(vec, 0));
 		if (vec == &vector_history) {
-			ast_mutex_lock(&history_lock);
+			ast_mutex_unlock(&history_lock);
 		}
 	}