[asterisk-dev] ast_channel_free

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Mon Aug 10 12:36:28 CDT 2009


On Monday 10 August 2009 10:51:41 am Johann Steinwendtner wrote:
> I 'm chasing down an iax problem on 1.6.0.10 where I sometimes get
> a lot of "I should not be called" from iax2_read. After about 30
> seconds of these messages, asterisk reboots.
> I 've decided to hangup the faulty call by returning NULL instead
> of a null-frame in iax2_read. (see issue #8286)
> Unfortunatley, this caused an immediate crash.
> in the logs I found:
>
> ERROR[5784] channel.c: Unable to find channel in list to free. Assuming it
> has already been done.
>
> This message is from ast_channel_free (channel.c)
>
> My question: If the above error occurs, should we continue with
> ast_free_channel or just return ? Otherwise, AST_RWLIST_UNLOCK would be
> superfluous in this case.

I think the concern was of a memory leak, but if the channel is not in the
list, that's enough of a concern to warrant bugging out (perhaps a DO_CRASH
would be helpful there).

-- 
Tilghman



More information about the asterisk-dev mailing list