From: Theodore Tso Date: Thu, 3 Jun 1993 11:42:29 +0000 (+0000) Subject: Fixed bug where a freed structure was being derefenced X-Git-Tag: krb5-1.0-beta3~264 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=90d4223ce97168d1c84a2a6634956627b0a4437c;p=krb5.git Fixed bug where a freed structure was being derefenced git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2574 dc483132-0cff-0310-8789-dd5450dbe970 --- 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; }