release key_mtx on return path.

This commit is contained in:
mlelstv 2017-05-28 14:16:05 +00:00
parent d6a4153fe2
commit 48439a854c
1 changed files with 3 additions and 2 deletions

View File

@ -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 <sys/cdefs.h>
__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 {