[Asterisk-Dev] SIP_MYSQL_FRIENDS
Marcin Kwiatkowski
mkwiatkowski at telebonus.pl
Mon Jan 31 07:04:41 MST 2005
Hello,
Is MySQL peers and users *'s code stable (1.0.4)? We probably have found
some memory leaks. In chan_sip.c function find_user if MYSQL_USERS is
defined function mysql_user is called. This function malloc's memory for
sip_user struct. find_user is called from another function
update_user_counter. If find_user returns pointer to sip_user (found in
SQL, not list) this data is never released. It looks like
update_user_counter guess returned pointer is static list member.
Another function - check_user_full also calls find_user, in case where
user is found, but host access fails (line 5627) user variable is set to
null without memory releasing (line 5629).
Probably there is many other similar leaks in find_peer (memory for
sip_peer struct is never released).
--
Marcin Kwiatkowski
Senior IT Specialist
Telebonus Sp. z o.o.
Legionow 30
43-300 Bielsko-Biala
pho/fax: +48 (33) 828 25 21
mob: +48 605 923 944
--
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.3 - Release Date: 2005-01-24
More information about the asterisk-dev
mailing list