# HG changeset patch # User Jerry James # Date 1417821777 25200 # Node ID 7984e732829e22395c87d8b0354f4140cbe67209 # Parent b8316d3409cd8b1ef154dadfe31fc87f55145240 Fix file descriptor leak in pop.c. See in xemacs-patches. diff -r b8316d3409cd -r 7984e732829e lib-src/ChangeLog --- a/lib-src/ChangeLog Fri Nov 28 00:18:03 2014 +0000 +++ b/lib-src/ChangeLog Fri Dec 05 16:22:57 2014 -0700 @@ -1,3 +1,8 @@ +2014-12-05 Jerry James + + * pop.c (socket_connection): Do not leak a socket if the POP + server's address cannot be determined. + 2014-10-18 Aidan Kehoe * ootags.c (substitute): diff -r b8316d3409cd -r 7984e732829e lib-src/pop.c --- a/lib-src/pop.c Fri Nov 28 00:18:03 2014 +0000 +++ b/lib-src/pop.c Fri Dec 05 16:22:57 2014 -0700 @@ -1075,6 +1075,7 @@ try_count++; if ((! hostent) && ((h_errno != TRY_AGAIN) || (try_count == 5))) { + CLOSESOCKET (sock); strcpy (pop_error, "Could not determine POP server's address"); return (-1); }