[asterisk-commits] kharwell: branch 1.8 r398021 - /branches/1.8/main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 30 11:58:37 CDT 2013


Author: kharwell
Date: Fri Aug 30 11:58:34 2013
New Revision: 398021

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398021
Log:
Fix memory leak

Fixed a features.c test that leaked a reference to a parked call.  This caused
chancount to never reach 0, so graceful shutdown stops.  Also added an
unregister test.

(closes issue ASTERISK-22413)
Reported by: Corey Farrell
Patches:
     features-TEST_FRAMEWORK.patch uploaded by coreyfarrell (license 5909)

Modified:
    branches/1.8/main/features.c

Modified: branches/1.8/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/features.c?view=diff&rev=398021&r1=398020&r2=398021
==============================================================================
--- branches/1.8/main/features.c (original)
+++ branches/1.8/main/features.c Fri Aug 30 11:58:34 2013
@@ -8249,6 +8249,7 @@
 		}
 		res = -1;
 	}
+	parked_chan = ast_channel_unref(parked_chan);
 
 
 exit_features_test:
@@ -8275,6 +8276,9 @@
 	ast_unregister_application(parkcall);
 	ast_unregister_application(parkedcall);
 	ast_unregister_application(app_bridge);
+#if defined(TEST_FRAMEWORK)
+	AST_TEST_UNREGISTER(features_test);
+#endif	/* defined(TEST_FRAMEWORK) */
 
 	pthread_cancel(parking_thread);
 	pthread_kill(parking_thread, SIGURG);




More information about the asterisk-commits mailing list