Fix occasional RM_OpenKey() crashes.

This commit is contained in:
Yossi Gottlieb 2016-06-21 10:22:19 +03:00
parent 0b4b7ebd95
commit a8e2034548

View File

@ -1047,6 +1047,7 @@ void *RM_OpenKey(RedisModuleCtx *ctx, robj *keyname, int mode) {
kp->value = value; kp->value = value;
kp->iter = NULL; kp->iter = NULL;
kp->mode = mode; kp->mode = mode;
kp->ztype = REDISMODULE_ZSET_RANGE_NONE;
RM_ZsetRangeStop(kp); RM_ZsetRangeStop(kp);
autoMemoryAdd(ctx,REDISMODULE_AM_KEY,kp); autoMemoryAdd(ctx,REDISMODULE_AM_KEY,kp);
return (void*)kp; return (void*)kp;