Fix coverity 393052: API usage errors (LOCK) (#15832)
Stelios Fragkakis committed
Aug 17, 2023 at 23:54 UTC
48afde0b201c31dd1aa71a222a999fc6d70870af
1 file changed
+3
-3
database/rrdhost.c
+3
-3
@@ -331,6 +331,9 @@ int is_legacy = 1;
331
host->rrd_history_entries = align_entries_to_pagesize(memory_mode, entries);
332
host->health.health_enabled = ((memory_mode == RRD_MEMORY_MODE_NONE)) ? 0 : health_enabled;
333
334
+ netdata_mutex_init(&host->aclk_state_lock);
335
+ netdata_mutex_init(&host->receiver_lock);
336
+
337
if (likely(!archived)) {
338
rrdfunctions_init(host);
339
host->rrdlabels = rrdlabels_create();
@@ -361,9 +364,6 @@ int is_legacy = 1;
364
break;
365
}
366
364
- netdata_mutex_init(&host->aclk_state_lock);
365
- netdata_mutex_init(&host->receiver_lock);
366
-
367
host->system_info = system_info;
368
369
rrdset_index_init(host);