Two fixes found while debugging with ast_backtrace():
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 13 May 2009 00:13:43 +0000 (00:13 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 13 May 2009 00:13:43 +0000 (00:13 +0000)
commitc524f905a6c7d6f4a0f5c3c97a8a761f1a166959
treef37b70c464b220c367f37cfb491ae9503d6a72a5
parent68a37433bc9f1d4ff3e0784d4810b567636bdee7
Two fixes found while debugging with ast_backtrace():

1) If MALLOC_DEBUG is used when concurrently using ast_backtrace, the free()
used in that routine will trigger an error, because the memory was allocated
internally to libc, where we could not intercept that call to wrap it.
Therefore, it's not memory we knew about, and the free is reported as an
error.

2) Now that channels are objects, the old hack of initializing a channel
to all zeroes no longer works, since we may try to call something like
ast_channel_lock() within a function on that reference.  In that case, it's
reported as an error, because the pointer isn't an object reference.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/logger.c
main/pbx.c