From: Corey Farrell Date: Wed, 15 Aug 2018 16:12:49 +0000 (-0400) Subject: res_pjsip: Fix leak in pjsip_options. X-Git-Tag: 13.23.0-rc1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7df97d0a003edf58bf2c183807207edc9c02b1f3;p=thirdparty%2Fasterisk.git res_pjsip: Fix leak in pjsip_options. sip_options_get_endpoint_state_compositor_state leaked a reference to the first available endpoint state compositor that was found. Change-Id: Idb6be19f7219b6eed1dfb19c1e740dd40cb3fdc7 --- diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c index 891de899cf..f253dce600 100644 --- a/res/res_pjsip/pjsip_options.c +++ b/res/res_pjsip/pjsip_options.c @@ -565,6 +565,7 @@ static enum ast_endpoint_state sip_options_get_endpoint_state_compositor_state( for (; (aor_status = ao2_iterator_next(&it_aor_statuses)); ao2_ref(aor_status, -1)) { if (aor_status->available) { state = AST_ENDPOINT_ONLINE; + ao2_ref(aor_status, -1); break; } }