[asterisk-commits] mmichelson: trunk r188102 - /trunk/res/res_musiconhold.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 13 14:31:52 CDT 2009
Author: mmichelson
Date: Mon Apr 13 14:31:48 2009
New Revision: 188102
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=188102
Log:
Fix another crash related to cached realtime music on hold.
This was another off-by-one problem caused by moh_register.
Modified:
trunk/res/res_musiconhold.c
Modified: trunk/res/res_musiconhold.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/res/res_musiconhold.c?view=diff&rev=188102&r1=188101&r2=188102
==============================================================================
--- trunk/res/res_musiconhold.c (original)
+++ trunk/res/res_musiconhold.c Mon Apr 13 14:31:48 2009
@@ -1072,7 +1072,9 @@
if (!mohclass->delete) {
ast_log(LOG_WARNING, "Music on Hold class '%s' already exists\n", moh->name);
mohclass = mohclass_unref(mohclass, "unreffing mohclass we just found by name");
- moh = mohclass_unref(moh, "unreffing potential new moh class (it is a duplicate)");
+ if (unref) {
+ moh = mohclass_unref(moh, "unreffing potential new moh class (it is a duplicate)");
+ }
return -1;
}
mohclass = mohclass_unref(mohclass, "Unreffing mohclass we just found by name");
More information about the asterisk-commits
mailing list