[Freeswitch-users] Memory leak in mod_nibblebill or in ODBC core?

Rupa Schomaker rupa at rupa.com
Mon Apr 19 12:43:32 PDT 2010


ok, custom_sql path is fixed as of:

[master 9a74958] nibblebill - free properly if using custom_sql

On Mon, Apr 19, 2010 at 2:17 PM, Sergey Okhapkin
<sos at sokhapkin.dyndns.org>wrote:

> It would be the problem if custom_sql_* is set in nibblebill configuration,
> but it's not my case, I do not use custom sql. I'm looking at the code
> more....
>
> On Monday 19 April 2010, Brian West wrote:
> > No this isn't the problem it would show up on valgrind like crazy.
> >
> > /b
> >
> > On Apr 19, 2010, at 1:25 PM, Sergey Okhapkin wrote:
> > > Yes, I agree that these strdups can be ignored. I believe I found where
> > > the memory problem comes from, the beginning of bill_event function in
> > > mod_nubblebill has SWITCH_STANDARD_STREAM(sql_stream);
> > > But SWITCH_STANDARD_STREAM macro does malloc! I do not see a place in
> the
> > > function where the memory is freed. Am I right? #define
> > > SWITCH_STANDARD_STREAM(s) memset(&s, 0, sizeof(s)); s.data =
> > > malloc(SWITCH_CMD_CHUNK_LEN); \ switch_assert(s.data);
> > >                                                                       \
> > > memset(s.data, 0, SWITCH_CMD_CHUNK_LEN);
> > >                       \ s.end = s.data;
> > >                                                                       \
> > > s.data_size = SWITCH_CMD_CHUNK_LEN;
> > >                               \ s.write_function =
> > > switch_console_stream_write;                                         \
> > > s.raw_write_function = switch_console_stream_raw_write;
> > >       \ s.alloc_len = SWITCH_CMD_CHUNK_LEN;
> > >                                       \ s.alloc_chunk =
> > > SWITCH_CMD_CHUNK_LEN
> >
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
-Rupa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100419/1c5cc5e2/attachment.html 


More information about the FreeSWITCH-users mailing list