X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/10dea8dc1b6515bb8af6723fed4c28594572cefb..7fc98533392f455974d546c88bd4d41c85e6fe6d:/redis.c diff --git a/redis.c b/redis.c index 76682d82..dc8d84ff 100644 --- a/redis.c +++ b/redis.c @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#define REDIS_VERSION "1.3.13" +#define REDIS_VERSION "1.3.14" #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;