diff options
Diffstat (limited to 'res/res_agi.c')
-rw-r--r-- | res/res_agi.c | 3 |
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); } |