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
4d4c8c8a
Unverified
Commit
4d4c8c8a
authored
Apr 28, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
Apr 28, 2020
Browse files
Merge pull request #7160 from oranagra/refix-get_decoded_object
hickup, re-fix dictEncObjKeyCompare
parents
e8bc3068
9a3dab0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
4d4c8c8a
...
...
@@ -1223,11 +1223,11 @@ int dictEncObjKeyCompare(void *privdata, const void *key1,
* good reasons, because it would incrRefCount() the object, which
* is invalid. So we check to make sure dictFind() works with static
* objects as well. */
if
(
!
sdsEncodedObject
(
o1
)
)
o1
=
getDecodedObject
(
o1
);
if
(
!
sdsEncodedObject
(
o2
)
)
o2
=
getDecodedObject
(
o2
);
if
(
o1
->
refcount
!=
OBJ_STATIC_REFCOUNT
)
o1
=
getDecodedObject
(
o1
);
if
(
o2
->
refcount
!=
OBJ_STATIC_REFCOUNT
)
o2
=
getDecodedObject
(
o2
);
cmp
=
dictSdsKeyCompare
(
privdata
,
o1
->
ptr
,
o2
->
ptr
);
if
(
o1
!=
key1
)
decrRefCount
(
o1
);
if
(
o2
!=
key2
)
decrRefCount
(
o2
);
if
(
o1
->
refcount
!=
OBJ_STATIC_REFCOUNT
)
decrRefCount
(
o1
);
if
(
o2
->
refcount
!=
OBJ_STATIC_REFCOUNT
)
decrRefCount
(
o2
);
return
cmp
;
}
...
...
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