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
5fa5153b
Commit
5fa5153b
authored
Oct 25, 2013
by
antirez
Browse files
SCAN: simplify keys list cleanup using listSetFreeMethod().
parent
108c6e67
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
5fa5153b
...
@@ -398,11 +398,7 @@ void scanCommand(redisClient *c) {
...
@@ -398,11 +398,7 @@ void scanCommand(redisClient *c) {
}
}
cleanup:
cleanup:
while
((
node
=
listFirst
(
keys
))
!=
NULL
)
{
listSetFreeMethod
(
keys
,
decrRefCountVoid
);
robj
*
kobj
=
listNodeValue
(
node
);
decrRefCount
(
kobj
);
listDelNode
(
keys
,
node
);
}
listRelease
(
keys
);
listRelease
(
keys
);
}
}
...
...
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