diff --git a/src/module.c b/src/module.c index 62efa373..f5921d8f 100644 --- a/src/module.c +++ b/src/module.c @@ -1457,9 +1457,8 @@ static void zsetKeyReset(RedisModuleKey *key) /* Stop a sorted set iteration. */ void RM_ZsetRangeStop(RedisModuleKey *key) { /* Free resources if needed. */ - if (key->ztype == REDISMODULE_ZSET_RANGE_LEX) { + if (key->ztype == REDISMODULE_ZSET_RANGE_LEX) zslFreeLexRange(&key->zlrs); - } /* Setup sensible values so that misused iteration API calls when an * iterator is not active will result into something more sensible * than crashing. */