diff options
author | Greg Hudson <ghudson@mit.edu> | 2016-06-28 22:10:35 -0400 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2016-09-02 14:49:37 -0400 |
commit | 6d317c936c84b3c9599df25ae50aae817c1b16ee (patch) | |
tree | 0a2dfd335fc6578226496935d1af363c8db7b09b | |
parent | 0ff6cf86d047aeb246ac183c5b5d56ff1de8223b (diff) | |
download | krb5-6d317c936c84b3c9599df25ae50aae817c1b16ee.zip krb5-6d317c936c84b3c9599df25ae50aae817c1b16ee.tar.gz krb5-6d317c936c84b3c9599df25ae50aae817c1b16ee.tar.bz2 |
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
-rw-r--r-- | 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, |