From 90d4223ce97168d1c84a2a6634956627b0a4437c Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 3 Jun 1993 11:42:29 +0000 Subject: [PATCH] Fixed bug where a freed structure was being derefenced git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2574 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/network.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kdc/network.c b/src/kdc/network.c index 1bc157631..65e867f40 100644 --- a/src/kdc/network.c +++ b/src/kdc/network.c @@ -204,17 +204,19 @@ process_packet(port_fd, prog, is_secondary) } cc = sendto(port_fd, response->data, response->length, 0, (struct sockaddr *)&saddr, saddr_len); - krb5_free_data(response); if (cc == -1) { + krb5_free_data(response); com_err(prog, errno, "while sending reply to %s/%d", inet_ntoa(saddr.sin_addr), ntohs(saddr.sin_port)); return errno; } if (cc != response->length) { + krb5_free_data(response); com_err(prog, 0, "short reply write %d vs %d\n", response->length, cc); return KDC5_IO_RESPONSE; } + krb5_free_data(response); return 0; } -- 2.26.2