add missing pointer invalidation
authorjcs <jcs@openbsd.org>
Tue, 16 May 2023 14:10:43 +0000 (14:10 +0000)
committerjcs <jcs@openbsd.org>
Tue, 16 May 2023 14:10:43 +0000 (14:10 +0000)
ok tb

lib/libssl/s3_lib.c

index 9e76cf9..4229b2e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_lib.c,v 1.242 2022/11/26 16:08:55 tb Exp $ */
+/* $OpenBSD: s3_lib.c,v 1.243 2023/05/16 14:10:43 jcs Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -1580,6 +1580,7 @@ ssl3_free(SSL *s)
 
        sk_X509_NAME_pop_free(s->s3->hs.tls12.ca_names, X509_NAME_free);
        sk_X509_pop_free(s->verified_chain, X509_free);
+       s->verified_chain = NULL;
 
        tls1_transcript_free(s);
        tls1_transcript_hash_free(s);