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"><<a href="mailto:sos@sokhapkin.dyndns.org">sos@sokhapkin.dyndns.org</a>></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's not my case, I do not use custom sql. I'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">> No this isn't the problem it would show up on valgrind like crazy.<br>
><br>
> /b<br>
><br>
> On Apr 19, 2010, at 1:25 PM, Sergey Okhapkin wrote:<br>
> > Yes, I agree that these strdups can be ignored. I believe I found where<br>
> > the memory problem comes from, the beginning of bill_event function in<br>
> > mod_nubblebill has SWITCH_STANDARD_STREAM(sql_stream);<br>
> > But SWITCH_STANDARD_STREAM macro does malloc! I do not see a place in the<br>
> > function where the memory is freed. Am I right? #define<br>
> > SWITCH_STANDARD_STREAM(s) memset(&s, 0, sizeof(s)); s.data =<br>
> > malloc(SWITCH_CMD_CHUNK_LEN); \ switch_assert(s.data);<br>
> > \<br>
> > memset(s.data, 0, SWITCH_CMD_CHUNK_LEN);<br>
> > \ s.end = s.data;<br>
> > \<br>
> > s.data_size = SWITCH_CMD_CHUNK_LEN;<br>
> > \ s.write_function =<br>
> > switch_console_stream_write; \<br>
> > s.raw_write_function = switch_console_stream_raw_write;<br>
> > \ s.alloc_len = SWITCH_CMD_CHUNK_LEN;<br>
> > \ s.alloc_chunk =<br>
> > SWITCH_CMD_CHUNK_LEN<br>
><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>