diff options
| author | jsing <> | 2017-01-09 15:31:20 +0000 |
|---|---|---|
| committer | jsing <> | 2017-01-09 15:31:20 +0000 |
| commit | 8f2060f57a83f3b6b423b11df3934ff4b88859d3 (patch) | |
| tree | 96bc3e756125604aabc8d7afd7a88cce047b3b14 /src/lib/libtls/tls_conninfo.c | |
| parent | 5c58f201628336b2a71f433881452a326c289de2 (diff) | |
| download | openbsd-8f2060f57a83f3b6b423b11df3934ff4b88859d3.tar.gz openbsd-8f2060f57a83f3b6b423b11df3934ff4b88859d3.tar.bz2 openbsd-8f2060f57a83f3b6b423b11df3934ff4b88859d3.zip | |
Avoid leaking conninfo servername.
Issue found by and fix from Shuo Chen <chenshuo at chenshuo dot com>.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libtls/tls_conninfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_conninfo.c b/src/lib/libtls/tls_conninfo.c index 1bf4b2285b..5cdd0f77c8 100644 --- a/src/lib/libtls/tls_conninfo.c +++ b/src/lib/libtls/tls_conninfo.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_conninfo.c,v 1.12 2016/11/04 18:07:24 beck Exp $ */ | 1 | /* $OpenBSD: tls_conninfo.c,v 1.13 2017/01/09 15:31:20 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> | 4 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> |
| @@ -248,6 +248,8 @@ tls_conninfo_free(struct tls_conninfo *conninfo) | |||
| 248 | conninfo->alpn = NULL; | 248 | conninfo->alpn = NULL; |
| 249 | free(conninfo->cipher); | 249 | free(conninfo->cipher); |
| 250 | conninfo->cipher = NULL; | 250 | conninfo->cipher = NULL; |
| 251 | free(conninfo->servername); | ||
| 252 | conninfo->servername = NULL; | ||
| 251 | free(conninfo->version); | 253 | free(conninfo->version); |
| 252 | conninfo->version = NULL; | 254 | conninfo->version = NULL; |
| 253 | 255 | ||
