Commit 158d1e2f authored by antirez's avatar antirez
Browse files

Fix GEORADIUS STORE/DIST refcount after backport to 3.2.

parent 123cd882
...@@ -615,6 +615,8 @@ void georadiusGeneric(client *c, int type) { ...@@ -615,6 +615,8 @@ void georadiusGeneric(client *c, int type) {
robj *ele = createObject(OBJ_STRING,gp->member); robj *ele = createObject(OBJ_STRING,gp->member);
if (maxelelen < elelen) maxelelen = elelen; 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); znode = zslInsert(zs->zsl,score,ele);
serverAssert(dictAdd(zs->dict,ele,&znode->score) == DICT_OK); serverAssert(dictAdd(zs->dict,ele,&znode->score) == DICT_OK);
gp->member = NULL; gp->member = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment