krb5 commit: Fix unlikely leak in sendto_kdc
Greg Hudson
ghudson at mit.edu
Wed Aug 10 13:51:41 EDT 2016
https://github.com/krb5/krb5/commit/6895dc9f204520e7f4da8da879cc67c149bc4e6b
commit 6895dc9f204520e7f4da8da879cc67c149bc4e6b
Author: Greg Hudson <ghudson at mit.edu>
Date: Tue Jun 28 22:10:35 2016 -0400
Fix unlikely leak in sendto_kdc
If a TCP connection is killed after it allocates the buffer (so is no
longer in READING state), free the buffer during cleanup.
ticket: 8444 (new)
target_version: 1.14-next
target_version: 1.13-next
tags: pullup
src/lib/krb5/os/sendto_kdc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c
index a2b7359..b3b8173 100644
--- a/src/lib/krb5/os/sendto_kdc.c
+++ b/src/lib/krb5/os/sendto_kdc.c
@@ -1578,7 +1578,7 @@ cleanup:
closesocket(state->fd);
free_http_tls_data(context, state);
}
- if (state->state == READING && state->in.buf != udpbuf)
+ if (state->in.buf != udpbuf)
free(state->in.buf);
if (callback_info) {
callback_info->pfn_cleanup(callback_info->data,
More information about the cvs-krb5
mailing list