]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Close the DAHDI FD on error when processing chan_dahdi toneduration config parameter.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 7 Jul 2010 18:12:41 +0000 (18:12 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 7 Jul 2010 18:12:41 +0000 (18:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@274579 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index e47b56107e9e2b0142ccb25520cbe916a03d5616..6111b160b6d6a9cd4fe85e04083a3d08142a3382 100644 (file)
@@ -12175,6 +12175,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
                                        res = ioctl(ctlfd, DAHDI_SET_DIALPARAMS, &dps);
                                        if (res < 0) {
                                                ast_log(LOG_ERROR, "Invalid tone duration: %d ms: %s\n", toneduration, strerror(errno));
+                                               close(ctlfd);
                                                return -1;
                                        }
                                }