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 {