From 592143001cad8b4383b8502b27366a8f75fa66ed Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 8 Feb 2018 10:02:49 +0000 Subject: Do not bother NULLing pointers in a struct that is about to be freed. --- lib/libtls/tls_conninfo.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/libtls/tls_conninfo.c b/lib/libtls/tls_conninfo.c index e3820988e82..685ed194e4e 100644 --- a/lib/libtls/tls_conninfo.c +++ b/lib/libtls/tls_conninfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_conninfo.c,v 1.16 2017/08/27 01:39:26 beck Exp $ */ +/* $OpenBSD: tls_conninfo.c,v 1.17 2018/02/08 10:02:48 jsing Exp $ */ /* * Copyright (c) 2015 Joel Sing * Copyright (c) 2015 Bob Beck @@ -276,24 +276,15 @@ tls_conninfo_free(struct tls_conninfo *conninfo) return; free(conninfo->alpn); - conninfo->alpn = NULL; free(conninfo->cipher); - conninfo->cipher = NULL; free(conninfo->servername); - conninfo->servername = NULL; free(conninfo->version); - conninfo->version = NULL; free(conninfo->hash); - conninfo->hash = NULL; free(conninfo->issuer); - conninfo->issuer = NULL; free(conninfo->subject); - conninfo->subject = NULL; free(conninfo->peer_cert); - conninfo->peer_cert = NULL; - conninfo->peer_cert_len = 0; free(conninfo); } -- cgit v1.2.3