From 7893d91a88fccc4f3fe547bf3063d3ce07e0df46 Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Tue, 1 Feb 2011 17:02:09 +0000 Subject: [PATCH] Merged revisions 305471 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r305471 | qwell | 2011-02-01 11:00:55 -0600 (Tue, 01 Feb 2011) | 9 lines Close file descriptor for timing source when a MOH class gets destroyed. (closes issue #18457) Reported by: mcallist Patches: 18457-closetimer.diff uploaded by qwell (license 4) 18457-closetimer_trunk.diff uploaded by qwell (license 4) Tested by: qwell, loloski ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@305472 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_musiconhold.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index ef15905d8b..3a1484f1d8 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -1559,6 +1559,11 @@ static void moh_class_destructor(void *obj) free(member); } + if (class->pseudofd > -1) { + close(class->pseudofd); + class->pseudofd = -1; + } + if (class->filearray) { int i; for (i = 0; i < class->total_files; i++) {