krb5 commit: Avoid redundant socket cleanup in sendto_kdc.c
Greg Hudson
ghudson at MIT.EDU
Thu Nov 29 01:59:47 EST 2012
https://github.com/krb5/krb5/commit/d31794d43d04d592d079a08dc3cc4ce7164c0df0
commit d31794d43d04d592d079a08dc3cc4ce7164c0df0
Author: Greg Hudson <ghudson at mit.edu>
Date: Wed Nov 28 20:19:37 2012 -0500
Avoid redundant socket cleanup in sendto_kdc.c
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 | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c
index 22cd908..d8b6a95 100644
--- a/src/lib/krb5/os/sendto_kdc.c
+++ b/src/lib/krb5/os/sendto_kdc.c
@@ -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) {
More information about the cvs-krb5
mailing list