diff options
author | Tobias Heider <tobhe@cvs.openbsd.org> | 2024-03-21 22:08:50 +0000 |
---|---|---|
committer | Tobias Heider <tobhe@cvs.openbsd.org> | 2024-03-21 22:08:50 +0000 |
commit | 06afae5bf2eb621f014e34c0070534cf40c07fc9 (patch) | |
tree | 8119b061f00d0173e8dde3a4b43ba0bd1762cb14 /sbin | |
parent | 9d5d1a0f87ceb665a80cef7025825b4fbf888ada (diff) |
Avoid redundant allocation in ikev2_prfplus()
from markus@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/ikev2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index d5cc0ed52bd..c0add7c3894 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.385 2024/03/02 16:16:07 tobhe Exp $ */ +/* $OpenBSD: ikev2.c,v 1.386 2024/03/21 22:08:49 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -5933,8 +5933,7 @@ ikev2_prfplus(struct iked_hash *prf, struct ibuf *key, struct ibuf *seed, for (i = 0; i < rlen; i++) { if (t1 != NULL) { - t2 = ibuf_new(ibuf_data(t1), ibuf_size(t1)); - ibuf_free(t1); + t2 = t1; } else t2 = ibuf_new(NULL, 0); t1 = ibuf_new(NULL, hash_keylength(prf)); |