diff options
-rw-r--r-- | res/res_musiconhold.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 410021547..45280bf74 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -1589,6 +1589,11 @@ static void moh_class_destructor(void *obj) class->filearray = NULL; } + if (class->timer) { + ast_timer_close(class->timer); + class->timer = NULL; + } + /* Finally, collect the exit status of the monitor thread */ if (tid > 0) { pthread_join(tid, NULL); |