[asterisk-commits] res pjsip: Fix leak of fake auth references. (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 6 13:56:03 CDT 2017


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

Change subject: res_pjsip: Fix leak of fake_auth references.
......................................................................

res_pjsip: Fix leak of fake_auth references.

pjsip_distributor leaks references to fake_auth when the default realm
has not changed.

ASTERISK-27306

Change-Id: I3fcf103b3680ad2d1d4610dcd6738eeaebf4d202
---
M res/res_pjsip/pjsip_distributor.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index cf1b04a..b4828d8 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -1142,9 +1142,9 @@
 		fake_auth = alloc_artificial_auth(default_realm);
 		if (fake_auth) {
 			ao2_global_obj_replace_unref(artificial_auth, fake_auth);
-			ao2_ref(fake_auth, -1);
 		}
 	}
+	ao2_cleanup(fake_auth);
 
 	ast_sip_get_unidentified_request_thresholds(&unidentified_count, &unidentified_period, &unidentified_prune_interval);
 

-- 
To view, visit https://gerrit.asterisk.org/6655
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: merged
Gerrit-Change-Id: I3fcf103b3680ad2d1d4610dcd6738eeaebf4d202
Gerrit-Change-Number: 6655
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20171006/7626b391/attachment-0001.html>


More information about the asterisk-commits mailing list