diff options
-rw-r--r-- | lib/libssl/tls12_record_layer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libssl/tls12_record_layer.c b/lib/libssl/tls12_record_layer.c index 32e3fcc8139..600b73987e1 100644 --- a/lib/libssl/tls12_record_layer.c +++ b/lib/libssl/tls12_record_layer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls12_record_layer.c,v 1.6 2021/01/07 15:32:59 jsing Exp $ */ +/* $OpenBSD: tls12_record_layer.c,v 1.7 2021/01/07 15:37:19 jsing Exp $ */ /* * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> * @@ -66,7 +66,11 @@ tls12_record_layer_new(void) void tls12_record_layer_free(struct tls12_record_layer *rl) { + if (rl == NULL) + return; + freezero(rl->read_mac_key, rl->read_mac_key_len); + freezero(rl, sizeof(struct tls12_record_layer)); } |