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

Corey Farrell asteriskteam at digium.com
Thu Oct 5 15:56:14 CDT 2017


Corey Farrell has uploaded this change for review. ( 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, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/56/6656/1

diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index 3f245ee..8e2ab7e 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -1134,6 +1134,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/6656
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fcf103b3680ad2d1d4610dcd6738eeaebf4d202
Gerrit-Change-Number: 6656
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/39a90639/attachment-0001.html>


More information about the asterisk-code-review mailing list