]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip: Fix leak in pjsip_options.
authorCorey Farrell <git@cfware.com>
Wed, 15 Aug 2018 16:12:49 +0000 (12:12 -0400)
committerKevin Harwell <kharwell@digium.com>
Thu, 16 Aug 2018 14:41:52 +0000 (09:41 -0500)
sip_options_get_endpoint_state_compositor_state leaked a reference to
the first available endpoint state compositor that was found.

Change-Id: Idb6be19f7219b6eed1dfb19c1e740dd40cb3fdc7

res/res_pjsip/pjsip_options.c

index 5eaf9e8fd4c62a2cde164ef7902d9857ec99adc1..eb84c1b36bcaa6d84c6f1415e30b012b6f1f751f 100644 (file)
@@ -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;
                }
        }