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