Don't leak a file discriptor if a service we've called accept() for

loops.

Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
This commit is contained in:
David Malone 2000-10-21 09:43:12 +00:00
parent 95dc2c3cae
commit f27a3b3e41

View File

@ -604,6 +604,9 @@ main(argc, argv, envp)
syslog(LOG_ERR,
"%s/%s server failing (looping), service terminated",
sep->se_service, sep->se_proto);
if (sep->se_accept &&
sep->se_socktype == SOCK_STREAM)
close(ctrl);
close_sep(sep);
sigsetmask(0L);
if (!timingout) {