krb5 commit [krb5-1.14]: Fix unlikely leak in sendto_kdc
Tom Yu
tlyu at mit.edu
Fri Sep 2 17:04:26 EDT 2016
https://github.com/krb5/krb5/commit/6d317c936c84b3c9599df25ae50aae817c1b16ee
commit 6d317c936c84b3c9599df25ae50aae817c1b16ee
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.
(cherry picked from commit 6895dc9f204520e7f4da8da879cc67c149bc4e6b)
ticket: 8444
version_fixed: 1.14.4
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 cb4c236..5d9fbc2 100644
--- a/src/lib/krb5/os/sendto_kdc.c
+++ b/src/lib/krb5/os/sendto_kdc.c
@@ -1520,7 +1520,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