[Asterisk-code-review] res pjsip: Fix leak in pjsip options. (asterisk[13])

George Joseph asteriskteam at digium.com
Thu Aug 16 09:44:37 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/9874 )

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:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c
index 891de89..f253dce 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/9874
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Idb6be19f7219b6eed1dfb19c1e740dd40cb3fdc7
Gerrit-Change-Number: 9874
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180816/f90df5ef/attachment.html>


More information about the asterisk-code-review mailing list