[asterisk-commits] kmoore: branch group/media_formats-reviewed-trunk r418780 - /team/group/media...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 16 12:15:52 CDT 2014


Author: kmoore
Date: Wed Jul 16 12:15:45 2014
New Revision: 418780

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418780
Log:
media formats: Ensure MoH state is cleaned up

When MoH was converted to use refcounted formats, one of the two
formats that a MoH state holds was not cleaned up properly.
moh_files_release now handles both format references properly.

Review: https://reviewboard.asterisk.org/r/3808/

Modified:
    team/group/media_formats-reviewed-trunk/res/res_musiconhold.c

Modified: team/group/media_formats-reviewed-trunk/res/res_musiconhold.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats-reviewed-trunk/res/res_musiconhold.c?view=diff&rev=418780&r1=418779&r2=418780
==============================================================================
--- team/group/media_formats-reviewed-trunk/res/res_musiconhold.c (original)
+++ team/group/media_formats-reviewed-trunk/res/res_musiconhold.c Wed Jul 16 12:15:45 2014
@@ -295,6 +295,8 @@
 		ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%s'\n", ast_channel_name(chan),
 			ast_format_get_name(state->origwfmt));
 	}
+	ao2_cleanup(state->origwfmt);
+	state->origwfmt = NULL;
 
 	state->save_pos = state->pos;
 	state->announcement = 0;




More information about the asterisk-commits mailing list