Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
158d1e2f
Commit
158d1e2f
authored
Feb 18, 2016
by
antirez
Browse files
Fix GEORADIUS STORE/DIST refcount after backport to 3.2.
parent
123cd882
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/geo.c
View file @
158d1e2f
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment