[asterisk-dev] [Code Review] 4509: Audit ast_sockaddr_resolve() usage memory leaks.
rmudgett
reviewboard at asterisk.org
Tue Mar 17 16:43:51 CDT 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4509/
-----------------------------------------------------------
(Updated March 17, 2015, 4:43 p.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers.
Changes
-------
Committed in revision 433056
Repository: Asterisk
Description
-------
Valgrind found some memory leaks associated with ast_sockaddr_resolve().
Most of the leaks had already been fixed by earlier memory leak hunt
patches. This patch performs an audit of ast_sockaddr_resolve() and found
one more.
* Fix ast_sockaddr_resolve() memory leak in
apps/app_externalivr.c:app_exec().
* Made main/netsock2.c:ast_sockaddr_resolve() always set the addrs
parameter for safety so the pointer will never be uninitialized on return.
The same goes for res/res_pjsip_acl.c:extract_contact_addr().
* Made functions that call ast_sockaddr_resolve() with RAII_VAR()
controlling the addrs variable use ast_free instead of ast_free_ptr to
provide better MALLOC_DEBUG information.
This review is against v13 but a subset applies to v11.
Diffs
-----
/branches/13/res/res_pjsip_t38.c 433004
/branches/13/res/res_pjsip_sdp_rtp.c 433004
/branches/13/res/res_pjsip_acl.c 433004
/branches/13/main/netsock2.c 433004
/branches/13/apps/app_externalivr.c 433004
Diff: https://reviewboard.asterisk.org/r/4509/diff/
Testing
-------
Compiling and code inspection.
Thanks,
rmudgett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150317/d601b1b8/attachment.html>
More information about the asterisk-dev
mailing list