From cd67a5286bc5773f9c590c9ff5d617f4e00f407d Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Mon, 9 Jan 2017 15:31:21 +0000 Subject: Avoid leaking conninfo servername. Issue found by and fix from Shuo Chen . --- lib/libtls/tls_conninfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libtls') 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 * Copyright (c) 2015 Bob Beck @@ -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; -- cgit v1.2.3