mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Cluster Manager: fix bus error in clusterManagerGetLinkStatus
This commit is contained in:
parent
121adc604b
commit
6e9864fe0d
@ -1994,6 +1994,15 @@ static dictType clusterManagerDictType = {
|
||||
dictSdsDestructor /* val destructor */
|
||||
};
|
||||
|
||||
static dictType clusterManagerLinkDictType = {
|
||||
dictSdsHash, /* hash function */
|
||||
NULL, /* key dup */
|
||||
NULL, /* val dup */
|
||||
dictSdsKeyCompare, /* key compare */
|
||||
dictSdsDestructor, /* key destructor */
|
||||
dictListDestructor /* val destructor */
|
||||
};
|
||||
|
||||
typedef int clusterManagerCommandProc(int argc, char **argv);
|
||||
typedef int (*clusterManagerOnReplyError)(redisReply *reply,
|
||||
clusterManagerNode *n, int bulk_idx);
|
||||
@ -3907,10 +3916,7 @@ cleanup:
|
||||
* node addresses that cannot reach the unreachable node. */
|
||||
static dict *clusterManagerGetLinkStatus(void) {
|
||||
if (cluster_manager.nodes == NULL) return NULL;
|
||||
dictType dtype = clusterManagerDictType;
|
||||
dtype.keyDestructor = dictSdsDestructor;
|
||||
dtype.valDestructor = dictListDestructor;
|
||||
dict *status = dictCreate(&dtype, NULL);
|
||||
dict *status = dictCreate(&clusterManagerLinkDictType, NULL);
|
||||
listIter li;
|
||||
listNode *ln;
|
||||
listRewind(cluster_manager.nodes, &li);
|
||||
|
Loading…
Reference in New Issue
Block a user