diff options
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 502fe9aa2..922701678 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -665,7 +665,10 @@ static struct mohdata *mohalloc(struct mohclass *cl) moh->f.offset = AST_FRIENDLY_OFFSET; moh->parent = cl; + + AST_LIST_LOCK(&mohclasses); AST_LIST_INSERT_HEAD(&cl->members, moh, list); + AST_LIST_UNLOCK(&mohclasses); return moh; } |