From 158d1e2fbf6badb881a4d78623fd1bffde34cc49 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 18 Feb 2016 15:33:02 +0100 Subject: [PATCH] Fix GEORADIUS STORE/DIST refcount after backport to 3.2. --- src/geo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/geo.c b/src/geo.c index 7f8084ac..c33d1604 100644 --- a/src/geo.c +++ b/src/geo.c @@ -615,6 +615,8 @@ void georadiusGeneric(client *c, int type) { robj *ele = createObject(OBJ_STRING,gp->member); if (maxelelen < elelen) maxelelen = elelen; + incrRefCount(ele); /* Set refcount to 2 since we reference the + object both in the skiplist and dict. */ znode = zslInsert(zs->zsl,score,ele); serverAssert(dictAdd(zs->dict,ele,&znode->score) == DICT_OK); gp->member = NULL;