From 429c571fa4fe828192cc5f5349218616a50efa70 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 24 Sep 2004 02:21:47 +0000 Subject: [PATCH] * network.c (closedown_network): Free each connection data structure while closing file descriptors. ticket: 1210 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16789 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/ChangeLog | 3 +++ src/kdc/network.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index 64cb0ab4b..69f392c51 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,5 +1,8 @@ 2004-09-23 Ken Raeburn + * network.c (closedown_network): Free each connection data + structure while closing file descriptors. + * kdc_util.h (sockaddr2p): Don't declare. 2004-07-23 Tom Yu diff --git a/src/kdc/network.c b/src/kdc/network.c index a7bfbc8fa..d05057aca 100644 --- a/src/kdc/network.c +++ b/src/kdc/network.c @@ -1069,6 +1069,11 @@ closedown_network(const char *prog) if (conn->fd >= 0) (void) close(conn->fd); DEL (connections, i); + /* There may also be per-connection data in the tcp structure + (tcp.buffer, tcp.response) that we're not freeing here. + That should only happen if we quit with a connection in + progress. */ + free(conn); } FREE_SET_DATA(connections); FREE_SET_DATA(udp_port_data); -- 2.26.2