[asterisk-commits] res pjsip: Fix leak in pjsip options. (asterisk[16.0])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 16 10:20:27 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/9896 )

Change subject: res_pjsip: Fix leak in pjsip_options.
......................................................................

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
---
M res/res_pjsip/pjsip_options.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c
index 5eaf9e8..eb84c1b 100644
--- a/res/res_pjsip/pjsip_options.c
+++ b/res/res_pjsip/pjsip_options.c
@@ -565,6 +565,7 @@
 	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;
 		}
 	}

-- 
To view, visit https://gerrit.asterisk.org/9896
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16.0
Gerrit-MessageType: merged
Gerrit-Change-Id: Idb6be19f7219b6eed1dfb19c1e740dd40cb3fdc7
Gerrit-Change-Number: 9896
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20180816/09519300/attachment.html>


More information about the asterisk-commits mailing list