From 48439a854c94410de919dc62a17453662e7d47ab Mon Sep 17 00:00:00 2001 From: mlelstv Date: Sun, 28 May 2017 14:16:05 +0000 Subject: [PATCH] release key_mtx on return path. --- sys/netipsec/key.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 81aae26f18b3..e939954e6aaf 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.145 2017/05/26 08:26:22 ozaki-r Exp $ */ +/* $NetBSD: key.c,v 1.146 2017/05/28 14:16:05 mlelstv Exp $ */ /* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */ /* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.145 2017/05/26 08:26:22 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.146 2017/05/28 14:16:05 mlelstv Exp $"); /* * This code is referd to RFC 2367 @@ -6254,6 +6254,7 @@ key_acquire(const struct secasindex *saidx, struct secpolicy *sp) } else { /* increment counter and do nothing. */ newacq->count++; + mutex_exit(&key_mtx); return 0; } } else {