From 12336157df485f54b992507bdf12e97b8dae6d48 Mon Sep 17 00:00:00 2001 From: tobhe Date: Sat, 17 Jun 2023 22:33:34 +0000 Subject: [PATCH] Fix leak of key.id_buf in pubkey auth case. from markus --- sbin/iked/ca.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/iked/ca.c b/sbin/iked/ca.c index cd10fca4dd6..7f7c8bee0d3 100644 --- a/sbin/iked/ca.c +++ b/sbin/iked/ca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ca.c,v 1.92 2023/05/23 13:12:19 claudio Exp $ */ +/* $OpenBSD: ca.c,v 1.93 2023/06/17 22:33:34 tobhe Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -560,9 +560,9 @@ ca_getcert(struct iked *env, struct imsg *imsg) iov[2].iov_base = ptr; iov[2].iov_len = len; - if (proc_composev(&env->sc_ps, PROC_IKEV2, cmd, iov, iovcnt) == -1) - return (-1); - return (0); + ret = proc_composev(&env->sc_ps, PROC_IKEV2, cmd, iov, iovcnt); + ibuf_free(key.id_buf); + return (ret); } static unsigned int -- 2.20.1