[Asterisk-code-review] AST-2018-005: Fix tdata leaks when calling pjsip endpt send ... (asterisk[13.19])

George Joseph asteriskteam at digium.com
Wed Feb 21 08:53:02 CST 2018


George Joseph has uploaded a new patch set (#2). ( https://gerrit.asterisk.org/8325 )

Change subject: AST-2018-005: Fix tdata leaks when calling pjsip_endpt_send_response(2)
......................................................................

AST-2018-005: Fix tdata leaks when calling pjsip_endpt_send_response(2)

pjsip_distributor:
   authenticate() creates a tdata and uses it to send a challenge or
   failure response.  When pjsip_endpt_send_response2() succeeds, it
   automatically decrements the tdata ref count but when it fails, it
   doesn't.  Since we weren't checking for a return status, we weren't
   decrementing the count ourselves on error and were therefore leaking
   tdatas.

res_pjsip_session:
   session_reinvite_on_rx_request wasn't decrementing the ref count
   if an error happened while sending a 491 response.
   pre_session_setup wasn't decrementing the ref count if
   while sending an error after a pjsip_inv_verify_request failure.

res_pjsip:
   ast_sip_send_response wasn't decrementing the ref count on error.

ASTERISK-27618
Reported By: Sandro Gauci

Change-Id: Iab33a6c7b6fba96148ed465b690ba8534ac961bf
---
M res/res_pjsip.c
M res/res_pjsip/pjsip_distributor.c
M res/res_pjsip_session.c
3 files changed, 20 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/8325/2
-- 
To view, visit https://gerrit.asterisk.org/8325
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13.19
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iab33a6c7b6fba96148ed465b690ba8534ac961bf
Gerrit-Change-Number: 8325
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180221/ed514cf0/attachment.html>


More information about the asterisk-code-review mailing list