]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Asterisk crash when unloading cdr_radius/cel_radius.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 3 Jun 2011 22:09:36 +0000 (22:09 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 3 Jun 2011 22:09:36 +0000 (22:09 +0000)
commit6b10de8830300cf41164e81d20ebdafca484d84c
treee8cde96835e99cc96a4aaf1e5f6440e60cf02b61
parent549f79b9f308239b681ae2d1d676a3fc04f5292e
Asterisk crash when unloading cdr_radius/cel_radius.

The rc_openlog() API call is passed a string that is used by openlog() to
format log messages.  The openlog() does not copy the string it just keeps
a pointer to it.  When the module is unloaded, the string is gone from
memory.  Depending upon module load order and if the other module then has
an error, a crash happens.

* Pass rc_openlog() a strdup'd string with the understanding that there
will be a small memory leak if the cdr_radius/cel_radius modules are
unloaded.

* Call rc_destroy() to free the rc handle memory when the module is
unloaded.

JIRA AST-483
JIRA SWP-3062

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
cdr/cdr_radius.c
cel/cel_radius.c