[Asterisk-code-review] res pjsip: Fix leak of fake auth references. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Thu Oct 5 15:55:28 CDT 2017


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/6653


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, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/53/6653/1

diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index cf1b04a..59a4c72 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -1144,6 +1144,8 @@
 			ao2_global_obj_replace_unref(artificial_auth, fake_auth);
 			ao2_ref(fake_auth, -1);
 		}
+	} else {
+		ao2_cleanup(fake_auth);
 	}
 
 	ast_sip_get_unidentified_request_thresholds(&unidentified_count, &unidentified_period, &unidentified_prune_interval);

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fcf103b3680ad2d1d4610dcd6738eeaebf4d202
Gerrit-Change-Number: 6653
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171005/824ca643/attachment.html>


More information about the asterisk-code-review mailing list