aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_agi.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-04-23 04:38:11 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-04-23 04:38:11 +0000
commitef4e527ca3bb022a54a4465acfd22f8c65c51a56 (patch)
tree5c9301be36ca96301a0113c911cc19c4d1894737 /apps/app_agi.c
parentff49af076a1ff127d2d371d1cd442df463b1b21b (diff)
Fix double close of file descriptor (bug #1473)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2751 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_agi.c')
-rwxr-xr-xapps/app_agi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_agi.c b/apps/app_agi.c
index d7cd4683e..98021fecf 100755
--- a/apps/app_agi.c
+++ b/apps/app_agi.c
@@ -1288,6 +1288,7 @@ static int run_agi(struct ast_channel *chan, char *request, AGI *agi, int pid, i
if (!(readf = fdopen(agi->ctrl, "r"))) {
ast_log(LOG_WARNING, "Unable to fdopen file descriptor\n");
kill(pid, SIGHUP);
+ close(agi->ctrl);
return -1;
}
setlinebuf(readf);
@@ -1465,7 +1466,6 @@ 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, tmp, &agi, pid, dead);
- close(fds[0]);
close(fds[1]);
if (efd > -1)
close(efd);