From: Joshua C. Colp Date: Mon, 25 Feb 2019 12:10:59 +0000 (-0400) Subject: res_ari_applications: Fix incorrect call to ao2_lock. X-Git-Tag: 17.0.0-rc1~174^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e687cf214d5a70815a3ba7d45ecd7724a5a415a9;p=thirdparty%2Fasterisk.git res_ari_applications: Fix incorrect call to ao2_lock. When listing the applications the apps lock was incorrectly locked twice instead of being locked and then unlocked. ASTERISK-28302 Change-Id: If7d064592a9e88c0f1049214c50e02be6dabf79e --- diff --git a/res/ari/resource_applications.c b/res/ari/resource_applications.c index 4a97401cf3..1d22a922b3 100644 --- a/res/ari/resource_applications.c +++ b/res/ari/resource_applications.c @@ -58,7 +58,7 @@ void ast_ari_applications_list(struct ast_variable *headers, ao2_lock(apps); count = ao2_container_count(apps); ao2_callback(apps, OBJ_NOLOCK | OBJ_NODATA, append_json, json); - ao2_lock(apps); + ao2_unlock(apps); if (count != ast_json_array_size(json)) { ast_ari_response_error(response, 500, "Internal Server Error",