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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 6 14:46:11 CDT 2017


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

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 3f245ee..591d7fe 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -1132,9 +1132,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/6656
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I3fcf103b3680ad2d1d4610dcd6738eeaebf4d202
Gerrit-Change-Number: 6656
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: 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/82d24629/attachment-0001.html>


More information about the asterisk-commits mailing list