diff --git a/src/lazyfree.c b/src/lazyfree.c index a2cf2c3ed..180a4349b 100644 --- a/src/lazyfree.c +++ b/src/lazyfree.c @@ -109,7 +109,7 @@ size_t lazyfreeGetFreeEffort(robj *key, robj *obj) { /* Every consumer group is an allocation and so are the entries in its * PEL. We use size of the first group's PEL as an estimate for all * others. */ - if (s->cgroups) { + if (s->cgroups && raxSize(s->cgroups)) { raxIterator ri; streamCG *cg; raxStart(&ri,s->cgroups);