summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authortobhe <tobhe@openbsd.org>2020-06-02 19:37:47 +0000
committertobhe <tobhe@openbsd.org>2020-06-02 19:37:47 +0000
commitbff00a46ae6a400028d866fb72ab5774fa0bb3fd (patch)
tree19dbe1da5af120bdd055b9c6ee3f61a721dafd65 /sbin
parentdisable debugging by default and only print unknown events when (diff)
downloadwireguard-openbsd-bff00a46ae6a400028d866fb72ab5774fa0bb3fd.tar.xz
wireguard-openbsd-bff00a46ae6a400028d866fb72ab5774fa0bb3fd.zip
Don't leak authmsg.
ok patrick@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/ikev2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index 01b70862afc..c17371afb5a 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.228 2020/05/30 17:44:35 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.229 2020/06/02 19:37:47 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -1257,8 +1257,10 @@ ikev2_init_auth(struct iked *env, struct iked_message *msg)
if (ca_setauth(env, sa, authmsg, PROC_CERT) == -1) {
log_debug("%s: failed to get cert", __func__);
+ ibuf_release(authmsg);
return (-1);
}
+ ibuf_release(authmsg);
return (ikev2_init_ike_auth(env, sa));
}