]> git.saurik.com Git - redis.git/blobdiff - redis.c
Master is now already unfreezed, unstable, and ready to hacking sessions!
[redis.git] / redis.c
diff --git a/redis.c b/redis.c
index 76682d827672fe1feaa18e48b5b9f74750b5002e..380924ded0206133004db10f808b5869bf392a4d 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define REDIS_VERSION "1.3.13"
+#define REDIS_VERSION "2.1.0"
 
 #include "fmacros.h"
 #include "config.h"
 
 #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);
     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));
         zn->span = zmalloc(sizeof(unsigned int) * (level - 1));
+    else
+        zn->span = NULL;
     zn->score = score;
     zn->obj = obj;
     return zn;
     zn->score = score;
     zn->obj = obj;
     return zn;