[asterisk-dev] [Code Review] chan_iax2 owner channel locking and memory leak

rmudgett at digium.com rmudgett at digium.com
Fri Sep 17 14:46:30 CDT 2010


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

Review request for Asterisk Developers and Russell Bryant.


Summary
-------

Mantis issue description:
Near the beginning of schedule_delivery(), ast_bridged_channel() is called on iaxs[fr->callno]->owner; however, that channel is not locked, which can result in ast_bridged_channel() crashing should owner->tech change to a technology that doesn't implement bridged_channel.

I also fixed the other calls to ast_bridged_channel() in chan_iax2.c since the owner lock was not held there either.

In the process of fixing the locking on ast_bridged_channel(), I also found a memory leak in socket_process().  The local struct variable ies.vars is not freed on early/abnormal function exits.


This addresses bug 17919.
    https://issues.asterisk.org/view.php?id=17919


Diffs
-----

  /branches/1.6.2/channels/chan_iax2.c 287385 

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


Testing
-------

Visual inspection and compile testing so far.


Thanks,

rmudgett




More information about the asterisk-dev mailing list