diff options
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index a2f0da3c7..a05279130 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -1510,9 +1510,9 @@ static int load_moh_classes(int reload) } /* Don't leak a class when it's already registered */ - moh_register(class, reload); - - numclasses++; + if (!moh_register(class, reload)) { + numclasses++; + } } ast_config_destroy(cfg); |