]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 305471 via svnmerge from
authorJason Parker <jparker@digium.com>
Tue, 1 Feb 2011 17:02:09 +0000 (17:02 +0000)
committerJason Parker <jparker@digium.com>
Tue, 1 Feb 2011 17:02:09 +0000 (17:02 +0000)
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

index ef15905d8b098c41a76f1edb2bba0e3e37810186..3a1484f1d835d709fa376cf25f79af6f02907659 100644 (file)
@@ -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++) {