# HG changeset patch # User Jerry James # Date 1418081229 25200 # Node ID c03dd89e0055aea3a6a6cb26feda9fac7bdf193b # Parent e24390bd42354fa2947ebaa5adecd0dbacbed5de Fix gnuserv file descriptor leak. See in xemacs-patches. diff -r e24390bd4235 -r c03dd89e0055 lib-src/ChangeLog --- a/lib-src/ChangeLog Fri Dec 05 16:56:13 2014 -0700 +++ b/lib-src/ChangeLog Mon Dec 08 16:27:09 2014 -0700 @@ -1,3 +1,8 @@ +2014-12-05 Jerry James + + * gnuserv.c (echo_request): close the socket when done + (handle_unix_request): do not call echo_request on accept failure + 2014-12-05 Jerry James * pop.c (socket_connection): Do not leak a socket if the POP diff -r e24390bd4235 -r c03dd89e0055 lib-src/gnuserv.c --- a/lib-src/gnuserv.c Fri Dec 05 16:56:13 2014 -0700 +++ b/lib-src/gnuserv.c Mon Dec 08 16:27:09 2014 -0700 @@ -321,6 +321,7 @@ exit(1); } /* if */ + close(s); } /* echo_request */ @@ -858,6 +859,7 @@ { perror(progname); fprintf(stderr,"%s: unable to accept\n",progname); + return; } /* if */ echo_request(s);