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:
Binbin 2023-07-07 21:40:44 +08:00 committed by GitHub
parent aefdc57f1e
commit 14f802b360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -998,6 +998,8 @@ void clusterInit(void) {
memset(server.cluster->slots,0, sizeof(server.cluster->slots));
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
* its own nodes.conf. */
server.cluster_config_file_lock_fd = -1;