ok, custom_sql path is fixed as of:<div><br></div><div><div>[master 9a74958] nibblebill - free properly if using custom_sql</div><div><br></div><div class="gmail_quote">On Mon, Apr 19, 2010 at 2:17 PM, Sergey Okhapkin <span dir="ltr">&lt;<a href="mailto:sos@sokhapkin.dyndns.org">sos@sokhapkin.dyndns.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">It would be the problem if custom_sql_* is set in nibblebill configuration,<br>
but it&#39;s not my case, I do not use custom sql. I&#39;m looking at the code<br>
more....<br>
<div class="im"><br>
On Monday 19 April 2010, Brian West wrote:<br>
</div><div><div></div><div class="h5">&gt; No this isn&#39;t the problem it would show up on valgrind like crazy.<br>
&gt;<br>
&gt; /b<br>
&gt;<br>
&gt; On Apr 19, 2010, at 1:25 PM, Sergey Okhapkin wrote:<br>
&gt; &gt; Yes, I agree that these strdups can be ignored. I believe I found where<br>
&gt; &gt; the memory problem comes from, the beginning of bill_event function in<br>
&gt; &gt; mod_nubblebill has SWITCH_STANDARD_STREAM(sql_stream);<br>
&gt; &gt; But SWITCH_STANDARD_STREAM macro does malloc! I do not see a place in the<br>
&gt; &gt; function where the memory is freed. Am I right? #define<br>
&gt; &gt; SWITCH_STANDARD_STREAM(s) memset(&amp;s, 0, sizeof(s)); s.data =<br>
&gt; &gt; malloc(SWITCH_CMD_CHUNK_LEN); \ switch_assert(s.data);<br>
&gt; &gt;                                                                       \<br>
&gt; &gt; memset(s.data, 0, SWITCH_CMD_CHUNK_LEN);<br>
&gt; &gt;                       \ s.end = s.data;<br>
&gt; &gt;                                                                       \<br>
&gt; &gt; s.data_size = SWITCH_CMD_CHUNK_LEN;<br>
&gt; &gt;                               \ s.write_function =<br>
&gt; &gt; switch_console_stream_write;                                         \<br>
&gt; &gt; s.raw_write_function = switch_console_stream_raw_write;<br>
&gt; &gt;       \ s.alloc_len = SWITCH_CMD_CHUNK_LEN;<br>
&gt; &gt;                                       \ s.alloc_chunk =<br>
&gt; &gt; SWITCH_CMD_CHUNK_LEN<br>
&gt;<br>
<br>
<br>
</div></div><div><div></div><div class="h5">_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-Rupa<br>
</div>