From: Tilghman Lesher Date: Tue, 11 Apr 2006 21:58:44 +0000 (+0000) Subject: Merged revisions 19351 via svnmerge from X-Git-Tag: 1.4.0-beta1~2018 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2374e4c77ac5c474588eefc5887eea7679b0a8c5;p=thirdparty%2Fasterisk.git Merged revisions 19351 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r19351 | tilghman | 2006-04-11 16:55:51 -0500 (Tue, 11 Apr 2006) | 2 lines Bug 6097 - possible descriptor leak ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19352 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/asterisk.c b/asterisk.c index 4e8f2591a5..5ce65ef2f5 100644 --- a/asterisk.c +++ b/asterisk.c @@ -597,6 +597,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);