From 04d4f2692e5d7c8351f32e050a74d09e981fe3e1 Mon Sep 17 00:00:00 2001 From: jsing Date: Thu, 8 Feb 2018 10:02:48 +0000 Subject: [PATCH] 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(-) 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); } -- 2.20.1