asterisk/cdr
Russell Bryant fde695bb7f Merged revisions 186229 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r186229 | russell | 2009-04-02 20:57:44 -0500 (Thu, 02 Apr 2009) | 21 lines

Fix a memory leak in cdr_radius.

I came across this while doing some testing of my ast_channel_ao2 branch.
After running a test overnight that generated over 5 million calls, Asterisk
had taken up about 1 GB of my system memory.  So, I re-ran the test with
MALLOC_DEBUG turned on.  However, it showed no leaks in Asterisk during the
test, even though Asterisk was still consuming it somehow.

Instead, I turned to valgrind, which when run with --leak-check=full, told
me exactly where the leak came from, which was from allocations inside the
radiusclient-ng library.  This explains why MALLOC_DEBUG did not report it.

After a bit of analysis, I found that we were leaking a little bit of memory
every time a CDR record was passed to cdr_radius.

I don't actually have a radius server set up to receive CDR records.  However,
I always have my development systems compile and install all modules.  In
addition to making sure there are not build errors across modules, always
loading modules helps find bugs like this, too, so it is strongly recommend for
all developers.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 02:03:48 +00:00
..
Makefile Begin on a crusade to end trailing whitespace! 2008-11-20 17:48:58 +00:00
cdr_adaptive_odbc.c remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC 2009-01-15 20:18:53 +00:00
cdr_csv.c Reloading the config and having no changes still initialized some settings to 0. Initialize settings after doing all of the cfg checks. 2008-11-21 17:08:16 +00:00
cdr_custom.c Begin on a crusade to end trailing whitespace! 2008-11-20 17:48:58 +00:00
cdr_manager.c Merge ast_str_opaque branch (discontinue usage of ast_str internals) 2008-12-13 08:36:35 +00:00
cdr_odbc.c remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC 2009-01-15 20:18:53 +00:00
cdr_pgsql.c When querying for the structure of the CDR table, remove the schema, if it 2008-12-15 18:09:58 +00:00
cdr_radius.c Merged revisions 186229 via svnmerge from 2009-04-03 02:03:48 +00:00
cdr_sqlite.c Begin on a crusade to end trailing whitespace! 2008-11-20 17:48:58 +00:00
cdr_sqlite3_custom.c Backport 1.6.0 fix to trunk (failsafe if db is not loaded) 2009-03-02 17:18:48 +00:00
cdr_tds.c incorporates r159808 from branches/1.4: 2008-11-29 17:57:39 +00:00