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
474adba9
Commit
474adba9
authored
Sep 21, 2017
by
antirez
Browse files
Clarify comment in change fixing #4323.
parent
fa2c0582
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/slowlog.c
View file @
474adba9
...
...
@@ -75,8 +75,12 @@ slowlogEntry *slowlogCreateEntry(client *c, robj **argv, int argc, long long dur
}
else
if
(
argv
[
j
]
->
refcount
==
OBJ_SHARED_REFCOUNT
)
{
se
->
argv
[
j
]
=
argv
[
j
];
}
else
{
/* Duplicate a string object,
* avoid memory leak for lazyfree. */
/* Here we need to dupliacate the string objects composing the
* argument vector of the command, because those may otherwise
* end shared with string objects stored into keys. Having
* shared objects between any part of Redis, and the data
* structure holding the data, is a problem: FLUSHALL ASYNC
* may release the shared string object and create a race. */
se
->
argv
[
j
]
=
dupStringObject
(
argv
[
j
]);
}
}
...
...
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