]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Avoid redundant socket cleanup in sendto_kdc.c
authorGreg Hudson <ghudson@mit.edu>
Thu, 29 Nov 2012 01:19:37 +0000 (20:19 -0500)
committerGreg Hudson <ghudson@mit.edu>
Thu, 29 Nov 2012 06:59:17 +0000 (01:59 -0500)
Since r25120, kill_conn() has been responsible for closing and
invalidating conn->fd.  In the unlikely event that the KDC sends a TCP
response to us before we send a TCP request, we were cleaning up the
socket again, which is useless (though also harmless).  Get rid of
that code.

src/lib/krb5/os/sendto_kdc.c

index 22cd90812662ada503ce9bd408935610aa1a5d3a..d8b6a95963970899465696b73cb516d3a42a42cd 100644 (file)
@@ -963,10 +963,6 @@ service_tcp_fd(krb5_context context, struct conn_state *conn,
         kill_conn:
             TRACE_SENDTO_KDC_TCP_DISCONNECT(context, conn);
             kill_conn(conn, selstate, e);
-            if (e == EINVAL) {
-                closesocket(conn->fd);
-                conn->fd = INVALID_SOCKET;
-            }
             return e == 0;
         }
         if (ssflags & SSF_EXCEPTION) {