aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-11 21:55:51 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-11 21:55:51 +0000
commitddd51fadff8a551b85e4dd5a84ed20204e294fbd (patch)
tree667e2eb6f6ecf532ef9c532ddff6fe5486a551f6 /asterisk.c
parent1ba459ced6ee4017eb45cb917ace62d4cea3eed2 (diff)
Bug 6097 - possible descriptor leak
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@19351 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rw-r--r--asterisk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/asterisk.c b/asterisk.c
index 40b822f69..5e1423e86 100644
--- a/asterisk.c
+++ b/asterisk.c
@@ -615,6 +615,8 @@ static void *listener(void *unused)
consoles[x].fd = s;
if (ast_pthread_create(&consoles[x].t, &attr, netconsole, &consoles[x])) {
ast_log(LOG_ERROR, "Unable to spawn thread to handle connection: %s\n", strerror(errno));
+ close(consoles[x].p[0]);
+ close(consoles[x].p[1]);
consoles[x].fd = -1;
fdprint(s, "Server failed to spawn thread\n");
close(s);