mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Merge pull request #5529 from yongman/fix-rediscli-malloc
fix zmalloc in clusterManagerComputeReshardTable
This commit is contained in:
commit
d9e822a14b
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user