aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-06 20:02:59 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-06 20:02:59 +0000
commit7de446642e8da35fe064e607c2aa618ca69475b4 (patch)
treeb03ab519192b7ff0432e38d15bbbbe2cd9e8813c /res
parent42ccece77f93550e92982c58cc5ce12644a8abb4 (diff)
Don't close the second file descriptor if it's the same as the first one, as it will have already been closed elsewhere and could cause massive panic. (issue #7699 reported by bn999)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@42148 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index e9b275ed0..de4c7be39 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2047,7 +2047,8 @@ static int agi_exec_full(struct ast_channel *chan, void *data, int enhanced, int
agi.ctrl = fds[0];
agi.audio = efd;
res = run_agi(chan, argv[0], &agi, pid, dead);
- close(fds[1]);
+ if (fds[1] != fds[0])
+ close(fds[1]);
if (efd > -1)
close(efd);
}