Do not bother NULLing pointers in a struct that is about to be freed.
authorjsing <jsing@openbsd.org>
Thu, 8 Feb 2018 10:02:48 +0000 (10:02 +0000)
committerjsing <jsing@openbsd.org>
Thu, 8 Feb 2018 10:02:48 +0000 (10:02 +0000)
lib/libtls/tls_conninfo.c

index e382098..685ed19 100644 (file)
@@ -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 <jsing@openbsd.org>
  * Copyright (c) 2015 Bob Beck <beck@openbsd.org>
@@ -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);
 }