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
1c637de9
Commit
1c637de9
authored
Nov 06, 2018
by
yongman
Committed by
antirez
Nov 07, 2018
Browse files
fix malloc in clusterManagerComputeReshardTable
parent
90b52fde
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
1c637de9
...
@@ -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