mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Initialize cluster owner_not_claiming_slot to avoid warning (#12391)
valgrind report a Uninitialised warning: ``` ==25508== Uninitialised value was created by a heap allocation ==25508== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==25508== by 0x1A35A1: ztrymalloc_usable_internal (zmalloc.c:117) ==25508== by 0x1A368D: zmalloc (zmalloc.c:145) ==25508== by 0x21FDEA: clusterInit (cluster.c:973) ==25508== by 0x19DC09: main (server.c:7306) ``` Introduced in #12344
This commit is contained in:
parent
aefdc57f1e
commit
14f802b360
@ -998,6 +998,8 @@ void clusterInit(void) {
|
|||||||
memset(server.cluster->slots,0, sizeof(server.cluster->slots));
|
memset(server.cluster->slots,0, sizeof(server.cluster->slots));
|
||||||
clusterCloseAllSlots();
|
clusterCloseAllSlots();
|
||||||
|
|
||||||
|
memset(server.cluster->owner_not_claiming_slot, 0, sizeof(server.cluster->owner_not_claiming_slot));
|
||||||
|
|
||||||
/* Lock the cluster config file to make sure every node uses
|
/* Lock the cluster config file to make sure every node uses
|
||||||
* its own nodes.conf. */
|
* its own nodes.conf. */
|
||||||
server.cluster_config_file_lock_fd = -1;
|
server.cluster_config_file_lock_fd = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user