fix malloc in clusterManagerComputeReshardTable

This commit is contained in:
yongman 2018-11-06 10:51:19 +08:00
parent 6ba50784b5
commit 4e74d9cf55

View File

@ -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);