diff options
author | Andrey V. Elsukov <ae@FreeBSD.org> | 2014-12-07 06:47:00 +0000 |
---|---|---|
committer | Andrey V. Elsukov <ae@FreeBSD.org> | 2014-12-07 06:47:00 +0000 |
commit | 4268212124aeca39548815e514b9290555d2348c (patch) | |
tree | 74d7cb133e1e73ed7eea1ed6e7ca5520ace68b8d /sys/netipsec/key.c | |
parent | 39cbb549cc7410337e5badcd508a629b7af77c70 (diff) | |
download | src-4268212124aeca39548815e514b9290555d2348c.tar.gz src-4268212124aeca39548815e514b9290555d2348c.zip |
key_getspacq() returns holding the spacq_lock. Unlock it in all cases.
MFC after: 1 week
Sponsored by: Yandex LLC
Notes
Notes:
svn path=/head/; revision=275575
Diffstat (limited to 'sys/netipsec/key.c')
-rw-r--r-- | sys/netipsec/key.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 54d51ffd729d..953f453ec761 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -2313,7 +2313,8 @@ key_spdacquire(struct secpolicy *sp) } else { /* increment counter and do nothing. */ newspacq->count++; - return 0; + SPACQ_UNLOCK(); + return (0); } SPACQ_UNLOCK(); } else { |