<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
While tracking down another issue, I came across this code in main/channel.c:ast_channel_free:<div><br class="webkit-block-placeholder"></div><div><div>        if (chan-&gt;tech_pvt) {</div><div>                ast_log(LOG_WARNING, "Channel '%s' may not have been hung up properly\n", chan-&gt;name);</div><div>                free(chan-&gt;tech_pvt);</div><div>        }</div><div><br class="webkit-block-placeholder"></div><div>I had valgrind report something was still using this. That may have been due to some other bugs since fixed in bug report 11940, but I'm not sure. Anyway, should this really be freeing chan-&gt;tech_pvt when chan_sip should generally be taking care of that?</div><div><br class="webkit-block-placeholder"></div><div><div>==7874== Invalid read of size 4</div><div>==7874==    at 0x59D0671: ??? (chan_sip.c:4564)</div><div>==7874==    by 0x5A03A9A: ??? (chan_sip.c:15366)</div><div>==7874==    by 0x80AD830: ast_io_wait (io.c:279)</div><div>==7874==    by 0x5A0477C: ??? (chan_sip.c:15613)</div><div>==7874==    by 0x810003C: dummy_start (utils.c:852)</div><div>==7874==    by 0x403123F: start_thread (in /lib/tls/i686/cmov/libpthread-2.3.6.so)</div><div>==7874==    by 0x4FAF49D: clone (in /lib/tls/i686/cmov/libc-2.3.6.so)</div><div>==7874==  Address 0x719d4d0 is 136 bytes inside a block of size 5,620 free'd</div><div>==7874==    at 0x401D40C: free (vg_replace_malloc.c:323)</div><div>==7874==    by 0x8072362: __ast_free_region (astmm.c:174)</div><div>==7874==    by 0x80726EE: __ast_free (astmm.c:208)</div><div>==7874==    by 0x8081D5F: ast_channel_free (channel.c:1202)</div><div>==7874==    by 0x8082A22: ast_hangup (channel.c:1496)</div><div>==7874==    by 0x697BD42: ??? (app_dial.c:1726)</div><div>==7874==    by 0x697BF6D: ??? (app_dial.c:1760)</div><div>==7874==    by 0x80BE5EE: pbx_exec (pbx.c:532)</div><div>==7874==    by 0x80C19E7: pbx_extension_helper (pbx.c:1851)</div><div>==7874==    by 0x80C2AE1: ast_spawn_extension (pbx.c:2306)</div><div>==7874==    by 0x80C2FFD: __ast_pbx_run (pbx.c:2408)</div><div>==7874==    by 0x80C3DB2: pbx_thread (pbx.c:2623)</div><div><br class="webkit-block-placeholder"></div></div><div>Norman Franke</div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><div>Answering Service for Directors, Inc.</div><div>www.myasd.com</div></div></span></span></span> </div><br></div></body></html>