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
d9e822a1
Unverified
Commit
d9e822a1
authored
Nov 06, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Nov 06, 2018
Browse files
Merge pull request #5529 from yongman/fix-rediscli-malloc
fix zmalloc in clusterManagerComputeReshardTable
parents
0e2f56d0
4e74d9cf
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
d9e822a1
...
@@ -4157,7 +4157,7 @@ static clusterManagerNode *clusterNodeForResharding(char *id,
...
@@ -4157,7 +4157,7 @@ static clusterManagerNode *clusterNodeForResharding(char *id,
static
list
*
clusterManagerComputeReshardTable
(
list
*
sources
,
int
numslots
)
{
static
list
*
clusterManagerComputeReshardTable
(
list
*
sources
,
int
numslots
)
{
list
*
moved
=
listCreate
();
list
*
moved
=
listCreate
();
int
src_count
=
listLength
(
sources
),
i
=
0
,
tot_slots
=
0
,
j
;
int
src_count
=
listLength
(
sources
),
i
=
0
,
tot_slots
=
0
,
j
;
clusterManagerNode
**
sorted
=
zmalloc
(
src_count
*
sizeof
(
*
*
sorted
));
clusterManagerNode
**
sorted
=
zmalloc
(
src_count
*
sizeof
(
*
sorted
));
listIter
li
;
listIter
li
;
listNode
*
ln
;
listNode
*
ln
;
listRewind
(
sources
,
&
li
);
listRewind
(
sources
,
&
li
);
...
...
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