Commit ee62842e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remember to release lock when we fail allocation.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4273 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9f685898
......@@ -1330,8 +1330,10 @@ smp_alloc(struct stevedore *st, size_t size, struct objcore *oc)
smp_new_seg(sc);
}
if (needed > smp_spaceleft(sg))
if (needed > smp_spaceleft(sg)) {
Lck_Unlock(&sc->mtx);
return (NULL);
}
assert(needed <= smp_spaceleft(sg));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment