<br><div class="gmail_quote">Hi all,<br><br clear="all">My custom IVR application of asterisk records the voice of user. <br>It sets the read format to sleaner using ast_set_read_format funciton on line number  2144.<br><span style="font-family: courier new,monospace;">        flag = ast_set_read_format(chan, AST_FORMAT_SLINEAR);</span><br>

Which is leaving behind some leaks : below is the part of the trace of asterisk under run valgrind as below:<br><br>==11972== <br>==11972== 52,512 bytes in 3 blocks are definitely lost in loss record 115 of 117<br>==11972==    at 0x4A04B32: calloc (vg_replace_malloc.c:279)<br>

==11972==    by 0x4A601D: newpvt (utils.h:359)<br>==11972==    by 0x4A714F: ast_translator_build_path (translate.c:288)<br>==11972==    by 0x438270: set_format (channel.c:2778)<br>==11972==    by 0x162A19A8: ??? (app_custom_ivr.c:2144)<br>

==11972==    by 0x1629FB83: ??? (app_custom_ivr.c:1099)<br>==11972==    by 0x1629EB25: ??? (app_custom_ivr.c:525)<br>==11972==    by 0x47F21C: pbx_extension_helper (pbx.c:537)<br>==11972==    by 0x4814E0: __ast_pbx_run (pbx.c:2317)<br>

==11972==    by 0x482158: pbx_thread (pbx.c:2634)<br>==11972==    by 0x4AB3EB: dummy_start (utils.c:865)<br>==11972==    by 0x376EC06616: start_thread (in /lib64/<a href="http://libpthread-2.5.so" target="_blank">libpthread-2.5.so</a>)<br>

==11972==    by 0x376E4D3C2C: clone (in /lib64/<a href="http://libc-2.5.so" target="_blank">libc-2.5.so</a>)<br>==11972== <br><br>I do reset the read format back to old read format, but even though it is showing leaks.<br>
<br>Any one can please let me know what i am missing in using ast_set_read_format function?<br>
<br></div><br>-- <br><br>-MohammedShehzad<br>