summaryrefslogtreecommitdiff
path: root/items.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-03-19 18:13:43 -0700
committerdormando <dormando@rydia.net>2017-03-19 18:13:43 -0700
commit2f9f51d48af688b1283a235de9d918963666e166 (patch)
treeff226d12187e309e1fb3643a160d77be5b4209c0 /items.c
parent87a395ae768f0886328e5e44055de47c5880b8a5 (diff)
downloadmemcached-2f9f51d48af688b1283a235de9d918963666e166.tar.gz
fix refcount leak in LRU bump buf
takes a long time for mc-crusher to find this. I didn't run it long enough :(
Diffstat (limited to 'items.c')
-rw-r--r--items.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/items.c b/items.c
index b5f1fe9..78be101 100644
--- a/items.c
+++ b/items.c
@@ -1142,6 +1142,9 @@ static bool lru_bump_async(lru_bump_buf *b, item *it, uint32_t hv) {
ret = false;
b->dropped++;
}
+ if (!ret) {
+ refcount_decr(it);
+ }
pthread_mutex_unlock(&b->mutex);
return ret;
}