<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">No this isn't the problem it would show up on valgrind like crazy.<div><br></div><div>/b</div><div><br><div><div>On Apr 19, 2010, at 1:25 PM, Sergey Okhapkin wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; 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="font-family: 'Sans Serif'; font-size: 13px; "><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">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</div><p style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></p><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">SWITCH_STANDARD_STREAM(sql_stream);</div><p style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></p><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">But SWITCH_STANDARD_STREAM macro does malloc! I do not see a place in the function where the memory is freed. Am I right?</div><p style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></p><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">#define SWITCH_STANDARD_STREAM(s) memset(&amp;s, 0, sizeof(s)); s.data = <span style="font-weight: 600; ">malloc(SWITCH_CMD_CHUNK_LEN)</span>; \</div><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">        switch_assert(s.data);                                                                                          \</div><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">        memset(s.data, 0, SWITCH_CMD_CHUNK_LEN);                                                        \</div><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">        s.end = s.data;                                                                                                         \</div><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">        s.data_size = SWITCH_CMD_CHUNK_LEN;                                                                     \</div><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">        s.write_function = switch_console_stream_write;                                         \</div><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">        s.raw_write_function = switch_console_stream_raw_write;                         \</div><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">        s.alloc_len = SWITCH_CMD_CHUNK_LEN;                                                                     \</div><div style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">        s.alloc_chunk = SWITCH_CMD_CHUNK_LEN</div></span></span></blockquote></div><br></div></body></html>