mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
fix malloc in clusterManagerComputeReshardTable
This commit is contained in:
@@ -4061,7 +4061,7 @@ static clusterManagerNode *clusterNodeForResharding(char *id,
|
||||
static list *clusterManagerComputeReshardTable(list *sources, int numslots) {
|
||||
list *moved = listCreate();
|
||||
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;
|
||||
listNode *ln;
|
||||
listRewind(sources, &li);
|
||||
|
||||
Reference in New Issue
Block a user