summaryrefslogtreecommitdiffstats
path: root/sys/netipsec
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2014-12-16 11:24:07 +0000
committerae <ae@FreeBSD.org>2014-12-16 11:24:07 +0000
commit6fc2bb76afe442ed3756e1a4ccf889430c6b0134 (patch)
tree0812ef5552bbbaf81f634aaee3652d2e07b372dc /sys/netipsec
parenta82091426b012ad2a0e19417587d6999e4127c3f (diff)
downloadFreeBSD-src-6fc2bb76afe442ed3756e1a4ccf889430c6b0134.zip
FreeBSD-src-6fc2bb76afe442ed3756e1a4ccf889430c6b0134.tar.gz
MFC r275575:
key_getspacq() returns holding the spacq_lock. Unlock it in all cases. Sponsored by: Yandex LLC
Diffstat (limited to 'sys/netipsec')
-rw-r--r--sys/netipsec/key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index f7f23d4..13e62b1 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -2336,7 +2336,8 @@ key_spdacquire(sp)
} else {
/* increment counter and do nothing. */
newspacq->count++;
- return 0;
+ SPACQ_UNLOCK();
+ return (0);
}
SPACQ_UNLOCK();
} else {
OpenPOWER on IntegriCloud