mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Fix another crash related to cached realtime music on hold.
This was another off-by-one problem caused by moh_register. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1072,7 +1072,9 @@ static int moh_register(struct mohclass *moh, int reload, int unref)
|
||||
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");
|
||||
|
Reference in New Issue
Block a user