Summary: | ASTERISK-06033: [patch] extra statement causing memory leak on unload in chan_sip.c | ||
Reporter: | Luigi Rizzo (rizzo) | Labels: | |
Date Opened: | 2006-01-10 09:42:10.000-0600 | Date Closed: | 2008-01-15 16:16:24.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | the following block near line 13259 of chan_sip.c::unload_module() has an extra statement "iflist = NULL;" which prevents proper recovery of memory later when the channel resources should be destroyed. Simple fix is remove the statement as below. Probably applies to 1.2 as well if (!ast_mutex_lock(&iflock)) { /* Hangup all interfaces if they have an owner */ p = iflist; while (p) { if (p->owner) ast_softhangup(p->owner, AST_SOFTHANGUP_APPUNLOAD); p = p->next; } - iflist = NULL; ast_mutex_unlock(&iflock); } else { | ||
Comments: | By: Russell Bryant (russell) 2006-01-10 22:48:19.000-0600 fixed in 1.2 and the trunk, thanks! By: Digium Subversion (svnbot) 2008-01-15 16:14:09.000-0600 Repository: asterisk Revision: 7972 U branches/1.2/channels/chan_sip.c ------------------------------------------------------------------------ r7972 | russell | 2008-01-15 16:14:08 -0600 (Tue, 15 Jan 2008) | 2 lines fix mem leak on module unload (issue ASTERISK-6033) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7972 By: Digium Subversion (svnbot) 2008-01-15 16:14:09.000-0600 Repository: asterisk Revision: 7973 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r7973 | russell | 2008-01-15 16:14:09 -0600 (Tue, 15 Jan 2008) | 10 lines Merged revisions 7972 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7972 | russell | 2006-01-11 00:46:39 -0500 (Wed, 11 Jan 2006) | 2 lines fix mem leak on module unload (issue ASTERISK-6033) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7973 By: Digium Subversion (svnbot) 2008-01-15 16:15:20.000-0600 Repository: asterisk Revision: 8052 _U team/crichter/0.2.1/ U team/crichter/0.2.1/app.c U team/crichter/0.2.1/apps/app_dial.c U team/crichter/0.2.1/apps/app_voicemail.c U team/crichter/0.2.1/channel.c U team/crichter/0.2.1/channels/chan_agent.c U team/crichter/0.2.1/channels/chan_sip.c U team/crichter/0.2.1/configs/voicemail.conf.sample U team/crichter/0.2.1/pbx.c U team/crichter/0.2.1/translate.c ------------------------------------------------------------------------ r8052 | crichter | 2008-01-15 16:15:20 -0600 (Tue, 15 Jan 2008) | 61 lines Merged revisions 7955,7957,7960,7963,7965,7970,7972,7976,7986,7999,8047 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7955 | tilghman | 2006-01-11 02:30:10 +0100 (Mi, 11 Jan 2006) | 2 lines Bug 6192 - behave correctly when mailbox is specified as argument ........ r7957 | russell | 2006-01-11 04:12:44 +0100 (Mi, 11 Jan 2006) | 2 lines fix a little typo ........ r7960 | russell | 2006-01-11 05:19:21 +0100 (Mi, 11 Jan 2006) | 2 lines fix locking error - lock instead of unlock ........ r7963 | mogorman | 2006-01-11 05:38:07 +0100 (Mi, 11 Jan 2006) | 2 lines Minor typo refrenced in 6191 ........ r7965 | russell | 2006-01-11 05:53:24 +0100 (Mi, 11 Jan 2006) | 2 lines lock list of translators *before* recalculating the translation matrix ........ r7970 | russell | 2006-01-11 06:26:21 +0100 (Mi, 11 Jan 2006) | 3 lines don't override an error condition that occurred when acting on the primary channel when stopping the autoservice on the peer channel. (from issue ASTERISK-5929) ........ r7972 | russell | 2006-01-11 06:46:39 +0100 (Mi, 11 Jan 2006) | 2 lines fix mem leak on module unload (issue ASTERISK-6033) ........ r7976 | russell | 2006-01-11 08:18:16 +0100 (Mi, 11 Jan 2006) | 2 lines fix temp greetings with ODBC storage (issue ASTERISK-5920) ........ r7986 | russell | 2006-01-11 20:08:53 +0100 (Mi, 11 Jan 2006) | 2 lines move variable to correct scope (issue ASTERISK-6040) ........ r7999 | tilghman | 2006-01-12 07:14:22 +0100 (Do, 12 Jan 2006) | 2 lines Bug 6211 - Add option deletevoicemail as equivalent to option delete for Realtime ........ r8047 | russell | 2006-01-13 07:07:39 +0100 (Fr, 13 Jan 2006) | 2 lines fix spelling errors (issue ASTERISK-6069) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=8052 By: Digium Subversion (svnbot) 2008-01-15 16:16:13.000-0600 Repository: asterisk Revision: 8109 _U team/oej/metermaids/ U team/oej/metermaids/app.c U team/oej/metermaids/apps/app_dial.c U team/oej/metermaids/apps/app_voicemail.c U team/oej/metermaids/channel.c U team/oej/metermaids/channels/chan_agent.c U team/oej/metermaids/channels/chan_iax2.c U team/oej/metermaids/channels/chan_sip.c U team/oej/metermaids/configs/voicemail.conf.sample U team/oej/metermaids/doc/README.cdr U team/oej/metermaids/file.c U team/oej/metermaids/funcs/func_strings.c U team/oej/metermaids/pbx.c U team/oej/metermaids/translate.c ------------------------------------------------------------------------ r8109 | oej | 2008-01-15 16:16:13 -0600 (Tue, 15 Jan 2008) | 82 lines Merged revisions 7915,7917,7939,7955,7957,7960,7963,7965,7970,7972,7976,7986,7999,8047,8074 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7915 | russell | 2006-01-09 23:07:26 +0100 (Mon, 09 Jan 2006) | 2 lines add missing unlock (issue ASTERISK-5954) ........ r7917 | kpfleming | 2006-01-09 23:48:48 +0100 (Mon, 09 Jan 2006) | 2 lines re-initialize _all_ sequence numbers when transfer completes ........ r7939 | oej | 2006-01-10 09:48:14 +0100 (Tue, 10 Jan 2006) | 3 lines - Adding reference to README.tds - Reformatting table ........ r7955 | tilghman | 2006-01-11 02:30:10 +0100 (Wed, 11 Jan 2006) | 2 lines Bug 6192 - behave correctly when mailbox is specified as argument ........ r7957 | russell | 2006-01-11 04:12:44 +0100 (Wed, 11 Jan 2006) | 2 lines fix a little typo ........ r7960 | russell | 2006-01-11 05:19:21 +0100 (Wed, 11 Jan 2006) | 2 lines fix locking error - lock instead of unlock ........ r7963 | mogorman | 2006-01-11 05:38:07 +0100 (Wed, 11 Jan 2006) | 2 lines Minor typo refrenced in 6191 ........ r7965 | russell | 2006-01-11 05:53:24 +0100 (Wed, 11 Jan 2006) | 2 lines lock list of translators *before* recalculating the translation matrix ........ r7970 | russell | 2006-01-11 06:26:21 +0100 (Wed, 11 Jan 2006) | 3 lines don't override an error condition that occurred when acting on the primary channel when stopping the autoservice on the peer channel. (from issue ASTERISK-5929) ........ r7972 | russell | 2006-01-11 06:46:39 +0100 (Wed, 11 Jan 2006) | 2 lines fix mem leak on module unload (issue ASTERISK-6033) ........ r7976 | russell | 2006-01-11 08:18:16 +0100 (Wed, 11 Jan 2006) | 2 lines fix temp greetings with ODBC storage (issue ASTERISK-5920) ........ r7986 | russell | 2006-01-11 20:08:53 +0100 (Wed, 11 Jan 2006) | 2 lines move variable to correct scope (issue ASTERISK-6040) ........ r7999 | tilghman | 2006-01-12 07:14:22 +0100 (Thu, 12 Jan 2006) | 2 lines Bug 6211 - Add option deletevoicemail as equivalent to option delete for Realtime ........ r8047 | russell | 2006-01-13 07:07:39 +0100 (Fri, 13 Jan 2006) | 2 lines fix spelling errors (issue ASTERISK-6069) ........ r8074 | tilghman | 2006-01-14 20:06:44 +0100 (Sat, 14 Jan 2006) | 2 lines Bug 6238 - Fix segfault when delimiter not specified ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=8109 By: Digium Subversion (svnbot) 2008-01-15 16:16:15.000-0600 Repository: asterisk Revision: 8110 _U team/oej/managerstuff/ U team/oej/managerstuff/app.c U team/oej/managerstuff/apps/app_dial.c U team/oej/managerstuff/apps/app_voicemail.c U team/oej/managerstuff/channel.c U team/oej/managerstuff/channels/chan_agent.c U team/oej/managerstuff/channels/chan_sip.c U team/oej/managerstuff/configs/voicemail.conf.sample U team/oej/managerstuff/doc/README.cdr U team/oej/managerstuff/funcs/func_strings.c U team/oej/managerstuff/pbx.c U team/oej/managerstuff/translate.c ------------------------------------------------------------------------ r8110 | oej | 2008-01-15 16:16:15 -0600 (Tue, 15 Jan 2008) | 72 lines Merged revisions 7939,7955,7957,7960,7963,7965,7970,7972,7976,7986,7999,8047,8074 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7939 | oej | 2006-01-10 09:48:14 +0100 (Tue, 10 Jan 2006) | 3 lines - Adding reference to README.tds - Reformatting table ........ r7955 | tilghman | 2006-01-11 02:30:10 +0100 (Wed, 11 Jan 2006) | 2 lines Bug 6192 - behave correctly when mailbox is specified as argument ........ r7957 | russell | 2006-01-11 04:12:44 +0100 (Wed, 11 Jan 2006) | 2 lines fix a little typo ........ r7960 | russell | 2006-01-11 05:19:21 +0100 (Wed, 11 Jan 2006) | 2 lines fix locking error - lock instead of unlock ........ r7963 | mogorman | 2006-01-11 05:38:07 +0100 (Wed, 11 Jan 2006) | 2 lines Minor typo refrenced in 6191 ........ r7965 | russell | 2006-01-11 05:53:24 +0100 (Wed, 11 Jan 2006) | 2 lines lock list of translators *before* recalculating the translation matrix ........ r7970 | russell | 2006-01-11 06:26:21 +0100 (Wed, 11 Jan 2006) | 3 lines don't override an error condition that occurred when acting on the primary channel when stopping the autoservice on the peer channel. (from issue ASTERISK-5929) ........ r7972 | russell | 2006-01-11 06:46:39 +0100 (Wed, 11 Jan 2006) | 2 lines fix mem leak on module unload (issue ASTERISK-6033) ........ r7976 | russell | 2006-01-11 08:18:16 +0100 (Wed, 11 Jan 2006) | 2 lines fix temp greetings with ODBC storage (issue ASTERISK-5920) ........ r7986 | russell | 2006-01-11 20:08:53 +0100 (Wed, 11 Jan 2006) | 2 lines move variable to correct scope (issue ASTERISK-6040) ........ r7999 | tilghman | 2006-01-12 07:14:22 +0100 (Thu, 12 Jan 2006) | 2 lines Bug 6211 - Add option deletevoicemail as equivalent to option delete for Realtime ........ r8047 | russell | 2006-01-13 07:07:39 +0100 (Fri, 13 Jan 2006) | 2 lines fix spelling errors (issue ASTERISK-6069) ........ r8074 | tilghman | 2006-01-14 20:06:44 +0100 (Sat, 14 Jan 2006) | 2 lines Bug 6238 - Fix segfault when delimiter not specified ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=8110 By: Digium Subversion (svnbot) 2008-01-15 16:16:24.000-0600 Repository: asterisk Revision: 8119 _U team/oej/moduletest/ U team/oej/moduletest/app.c U team/oej/moduletest/apps/app_dial.c U team/oej/moduletest/apps/app_voicemail.c U team/oej/moduletest/asterisk.c U team/oej/moduletest/channel.c U team/oej/moduletest/channels/chan_agent.c U team/oej/moduletest/channels/chan_iax2.c U team/oej/moduletest/channels/chan_sip.c U team/oej/moduletest/configs/voicemail.conf.sample U team/oej/moduletest/db.c U team/oej/moduletest/doc/README.cdr U team/oej/moduletest/doc/README.variables U team/oej/moduletest/file.c U team/oej/moduletest/funcs/func_strings.c U team/oej/moduletest/pbx/pbx_spool.c U team/oej/moduletest/pbx.c U team/oej/moduletest/translate.c ------------------------------------------------------------------------ r8119 | oej | 2008-01-15 16:16:24 -0600 (Tue, 15 Jan 2008) | 112 lines Merged revisions 7898-7900,7904,7908,7915,7917,7939,7955,7957,7960,7963,7965,7970,7972,7976,7986,7999,8047,8074,8112 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7898 | kpfleming | 2006-01-09 19:08:07 +0100 (Mon, 09 Jan 2006) | 2 lines fix breakage introduced in revision 7871 ........ r7899 | kpfleming | 2006-01-09 19:09:53 +0100 (Mon, 09 Jan 2006) | 2 lines backport fix from revision 7856 of trunk ........ r7900 | kpfleming | 2006-01-09 19:11:23 +0100 (Mon, 09 Jan 2006) | 2 lines commit user/group-related changes from trunk ........ r7904 | tilghman | 2006-01-09 19:37:50 +0100 (Mon, 09 Jan 2006) | 2 lines Update variable documentation to match the code ........ r7908 | tilghman | 2006-01-09 21:08:24 +0100 (Mon, 09 Jan 2006) | 2 lines Bug 6157 - Memory leak ........ r7915 | russell | 2006-01-09 23:07:26 +0100 (Mon, 09 Jan 2006) | 2 lines add missing unlock (issue ASTERISK-5954) ........ r7917 | kpfleming | 2006-01-09 23:48:48 +0100 (Mon, 09 Jan 2006) | 2 lines re-initialize _all_ sequence numbers when transfer completes ........ r7939 | oej | 2006-01-10 09:48:14 +0100 (Tue, 10 Jan 2006) | 3 lines - Adding reference to README.tds - Reformatting table ........ r7955 | tilghman | 2006-01-11 02:30:10 +0100 (Wed, 11 Jan 2006) | 2 lines Bug 6192 - behave correctly when mailbox is specified as argument ........ r7957 | russell | 2006-01-11 04:12:44 +0100 (Wed, 11 Jan 2006) | 2 lines fix a little typo ........ r7960 | russell | 2006-01-11 05:19:21 +0100 (Wed, 11 Jan 2006) | 2 lines fix locking error - lock instead of unlock ........ r7963 | mogorman | 2006-01-11 05:38:07 +0100 (Wed, 11 Jan 2006) | 2 lines Minor typo refrenced in 6191 ........ r7965 | russell | 2006-01-11 05:53:24 +0100 (Wed, 11 Jan 2006) | 2 lines lock list of translators *before* recalculating the translation matrix ........ r7970 | russell | 2006-01-11 06:26:21 +0100 (Wed, 11 Jan 2006) | 3 lines don't override an error condition that occurred when acting on the primary channel when stopping the autoservice on the peer channel. (from issue ASTERISK-5929) ........ r7972 | russell | 2006-01-11 06:46:39 +0100 (Wed, 11 Jan 2006) | 2 lines fix mem leak on module unload (issue ASTERISK-6033) ........ r7976 | russell | 2006-01-11 08:18:16 +0100 (Wed, 11 Jan 2006) | 2 lines fix temp greetings with ODBC storage (issue ASTERISK-5920) ........ r7986 | russell | 2006-01-11 20:08:53 +0100 (Wed, 11 Jan 2006) | 2 lines move variable to correct scope (issue ASTERISK-6040) ........ r7999 | tilghman | 2006-01-12 07:14:22 +0100 (Thu, 12 Jan 2006) | 2 lines Bug 6211 - Add option deletevoicemail as equivalent to option delete for Realtime ........ r8047 | russell | 2006-01-13 07:07:39 +0100 (Fri, 13 Jan 2006) | 2 lines fix spelling errors (issue ASTERISK-6069) ........ r8074 | tilghman | 2006-01-14 20:06:44 +0100 (Sat, 14 Jan 2006) | 2 lines Bug 6238 - Fix segfault when delimiter not specified ........ r8112 | kpfleming | 2006-01-17 00:51:37 +0100 (Tue, 17 Jan 2006) | 2 lines do rlimit check _after_ reading config file, in case 'dumpcore' is specified there ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=8119 |