[Asterisk-code-review] res_pjsip: Fix transport_states ref leak (...asterisk[16])

Alexei Gradinari asteriskteam at digium.com
Tue Apr 9 16:57:47 CDT 2019


Alexei Gradinari has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11252


Change subject: res_pjsip: Fix transport_states ref leak
......................................................................

res_pjsip: Fix transport_states ref leak

Add missing ao2_ref(transport_state, -1) while iterate on a transport_states
container.

Change-Id: I40e35b5a339121300c80075c30db47201a6c374e
---
M res/res_pjsip/pjsip_message_filter.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/52/11252/1

diff --git a/res/res_pjsip/pjsip_message_filter.c b/res/res_pjsip/pjsip_message_filter.c
index a144213..32aaeca 100644
--- a/res/res_pjsip/pjsip_message_filter.c
+++ b/res/res_pjsip/pjsip_message_filter.c
@@ -118,6 +118,7 @@
 		}
 
 		sip_transport = transport_state->transport;
+		ao2_ref(transport_state, -1);
 		break;
 	}
 	ao2_iterator_destroy(&iter);

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11252
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I40e35b5a339121300c80075c30db47201a6c374e
Gerrit-Change-Number: 11252
Gerrit-PatchSet: 1
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190409/5f64d02f/attachment.html>


More information about the asterisk-code-review mailing list