summaryrefslogtreecommitdiff
path: root/lib/libssl/tls13_key_schedule.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/tls13_key_schedule.c')
-rw-r--r--lib/libssl/tls13_key_schedule.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libssl/tls13_key_schedule.c b/lib/libssl/tls13_key_schedule.c
index 2b236ee1132..bb96cf3dd85 100644
--- a/lib/libssl/tls13_key_schedule.c
+++ b/lib/libssl/tls13_key_schedule.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_key_schedule.c,v 1.13 2021/01/05 17:46:32 tb Exp $ */
+/* $OpenBSD: tls13_key_schedule.c,v 1.14 2021/01/05 18:36:22 tb Exp $ */
/*
* Copyright (c) 2018, Bob Beck <beck@openbsd.org>
*
@@ -26,15 +26,11 @@
int
tls13_secret_init(struct tls13_secret *secret, size_t len)
{
- uint8_t *data;
-
if (secret->data != NULL)
return 0;
- if ((data = calloc(1, len)) == NULL)
+ if ((secret->data = calloc(1, len)) == NULL)
return 0;
-
- secret->data = data;
secret->len = len;
return 1;