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

Only grab the reference count if we need it.

Spotted by:	Martin
parent c1bc0d8e
......@@ -546,7 +546,8 @@ BAN_CheckObject(struct worker *wrk, struct objcore *oc, struct req *req)
Lck_Lock(&ban_mtx);
b0 = ban_start;
bn = oc->ban;
bn->refcount++;
if (b0 != bn)
bn->refcount++;
Lck_Unlock(&ban_mtx);
AN(bn);
......
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