connection set.
(kill_tcp_connection): Move delete_fd call to the end.
(accept_tcp_connection): Decrement connection counter again if we drop the
incoming connection for lack of buffer space.
ticket: 2384
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16201
dc483132-0cff-0310-8789-
dd5450dbe970
+2004-03-22 Ken Raeburn <raeburn@mit.edu>
+
+ * network.c (delete_fd): Free pointed-to data after removing it
+ from the connection set.
+ (kill_tcp_connection): Move delete_fd call to the end.
+ (accept_tcp_connection): Decrement connection counter again if we
+ drop the incoming connection for lack of buffer space.
+
2004-03-15 Sam Hartman <hartmans@mit.edu>
* kdc_preauth.c (verify_sam_response): Free unparsed names
FOREACH_ELT(connections, i, conn)
if (conn == xconn) {
DEL(connections, i);
- return;
+ break;
}
+ free(xconn);
}
static int
newconn->u.tcp.addrbuf);
delete_fd(newconn);
close(s);
+ tcp_data_counter--;
return;
}
newconn->u.tcp.offset = 0;
static void
kill_tcp_connection(struct connection *conn)
{
- delete_fd(conn);
if (conn->u.tcp.response)
krb5_free_data(kdc_context, conn->u.tcp.response);
if (conn->u.tcp.buffer)
sstate.max--;
close(conn->fd);
conn->fd = -1;
+ delete_fd(conn);
tcp_data_counter--;
}