X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/10dea8dc1b6515bb8af6723fed4c28594572cefb..fda32cb6013c65f765fa9b203bed23e07d35ba59:/redis.c diff --git a/redis.c b/redis.c index 76682d82..380924de 100644 --- a/redis.c +++ b/redis.c @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#define REDIS_VERSION "1.3.13" +#define REDIS_VERSION "2.1.0" #include "fmacros.h" #include "config.h" @@ -5412,8 +5412,10 @@ static zskiplistNode *zslCreateNode(int level, double score, robj *obj) { zskiplistNode *zn = zmalloc(sizeof(*zn)); zn->forward = zmalloc(sizeof(zskiplistNode*) * level); - if (level > 0) + if (level > 1) zn->span = zmalloc(sizeof(unsigned int) * (level - 1)); + else + zn->span = NULL; zn->score = score; zn->obj = obj; return zn;