mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -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)) {
|
for (; (aor_status = ao2_iterator_next(&it_aor_statuses)); ao2_ref(aor_status, -1)) {
|
||||||
if (aor_status->available) {
|
if (aor_status->available) {
|
||||||
state = AST_ENDPOINT_ONLINE;
|
state = AST_ENDPOINT_ONLINE;
|
||||||
|
ao2_ref(aor_status, -1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user