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
58e9c261
Unverified
Commit
58e9c261
authored
Dec 24, 2020
by
sundb
Committed by
GitHub
Dec 23, 2020
Browse files
Fix redundancy incrRefCount in lmoveGenericCommand (#8218)
parent
ee59dc1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_list.c
View file @
58e9c261
...
...
@@ -729,10 +729,6 @@ void lmoveGenericCommand(client *c, int wherefrom, int whereto) {
if
(
checkType
(
c
,
dobj
,
OBJ_LIST
))
return
;
value
=
listTypePop
(
sobj
,
wherefrom
);
serverAssert
(
value
);
/* assertion for valgrind (avoid NPD) */
/* We saved touched key, and protect it, since lmoveHandlePush
* may change the client command argument vector (it does not
* currently). */
incrRefCount
(
touchedkey
);
lmoveHandlePush
(
c
,
c
->
argv
[
2
],
dobj
,
value
,
whereto
);
/* listTypePop returns an object with its refcount incremented */
...
...
@@ -749,7 +745,6 @@ void lmoveGenericCommand(client *c, int wherefrom, int whereto) {
touchedkey
,
c
->
db
->
id
);
}
signalModifiedKey
(
c
,
c
->
db
,
touchedkey
);
decrRefCount
(
touchedkey
);
server
.
dirty
++
;
if
(
c
->
cmd
->
proc
==
blmoveCommand
)
{
rewriteClientCommandVector
(
c
,
5
,
shared
.
lmove
,
...
...
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