[asterisk-dev] [Code Review] 4511: Audit ast_pjsip_rdata_get_endpoint() usage for ref leaks.

rmudgett reviewboard at asterisk.org
Tue Mar 17 22:04:30 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4511/
-----------------------------------------------------------

Review request for Asterisk Developers.


Repository: Asterisk


Description
-------

Valgrind found some memory leaks associated with
ast_pjsip_rdata_get_endpoint().  The leaks would manifest when sending
responses to OPTIONS requests, processing MESSAGE requests, and
res_pjsip supplements implementing the incoming_request callback.

* Fix ast_pjsip_rdata_get_endpoint() endpoint ref leaks in
res/res_pjsip.c:supplement_on_rx_request(),
res/res_pjsip/pjsip_options.c:send_options_response(),
res/res_pjsip_messaging.c:rx_data_to_ast_msg(), and
res/res_pjsip_messaging.c:send_response().

* Eliminated RAII_VAR() use with ast_pjsip_rdata_get_endpoint() in
res/res_pjsip_nat.c:nat_on_rx_message().

* Fixed inconsistent but benign return value in
res/res_pjsip/pjsip_options.c:options_on_rx_request().


Diffs
-----

  /branches/13/res/res_pjsip_nat.c 433089 
  /branches/13/res/res_pjsip_messaging.c 433089 
  /branches/13/res/res_pjsip/pjsip_options.c 433089 
  /branches/13/res/res_pjsip.c 433089 

Diff: https://reviewboard.asterisk.org/r/4511/diff/


Testing
-------

Added temporary logging messages to show that incoming OPTIONS and MESSAGE
requests hit the code that leaked the endpoint object refs.


Thanks,

rmudgett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150318/af5ead9e/attachment.html>


More information about the asterisk-dev mailing list