summaryrefslogtreecommitdiff
path: root/lib/libtls/tls_conninfo.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2017-01-09 15:31:21 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2017-01-09 15:31:21 +0000
commitcd67a5286bc5773f9c590c9ff5d617f4e00f407d (patch)
treeaddb5b6f931ee82b28602182beffa1c4ca8fd608 /lib/libtls/tls_conninfo.c
parent65cbefc932ed629628895ae2493bd64c22ef3d1e (diff)
Avoid leaking conninfo servername.
Issue found by and fix from Shuo Chen <chenshuo at chenshuo dot com>.
Diffstat (limited to 'lib/libtls/tls_conninfo.c')
-rw-r--r--lib/libtls/tls_conninfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libtls/tls_conninfo.c b/lib/libtls/tls_conninfo.c
index 1bf4b2285b2..5cdd0f77c8f 100644
--- a/lib/libtls/tls_conninfo.c
+++ b/lib/libtls/tls_conninfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_conninfo.c,v 1.12 2016/11/04 18:07:24 beck Exp $ */
+/* $OpenBSD: tls_conninfo.c,v 1.13 2017/01/09 15:31:20 jsing Exp $ */
/*
* Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2015 Bob Beck <beck@openbsd.org>
@@ -248,6 +248,8 @@ tls_conninfo_free(struct tls_conninfo *conninfo)
conninfo->alpn = NULL;
free(conninfo->cipher);
conninfo->cipher = NULL;
+ free(conninfo->servername);
+ conninfo->servername = NULL;
free(conninfo->version);
conninfo->version = NULL;