@cryptotaxi247 / netdata-1 / commits / 8196612ba

Fix memory leak (#11631)

Stelios Fragkakis committed Oct 7, 2021 at 12:23 UTC 8196612ba0b6f8af8575fb64a55e705af9aaa4fe
2 files changed +4 -1
aclk/aclk_rx_msgs.c
+1
@@ -391,6 +391,7 @@ void aclk_handle_new_cloud_msg(const char *message_type, const char *msg, size_t
391 char *config_hash = parse_send_alarm_configuration(msg, msg_len);
392 if (!config_hash || !*config_hash) {
393 error("Error parsing SendAlarmConfiguration");
394 + freez(config_hash);
395 return;
396 }
397 aclk_send_alarm_configuration(config_hash);
database/sqlite/sqlite_aclk_node.c
+3 -1
@@ -119,8 +119,10 @@ void aclk_update_retention(struct aclk_database_worker_config *wc, struct aclk_d
119
120 uuid_t host_uuid;
121 rc = uuid_parse(wc->host_guid, host_uuid);
122 - if (unlikely(rc))
122 + if (unlikely(rc)) {
123 + freez(claim_id);
124 return;
125 + }
126
127 if (wc->host)
128 memory_mode = wc->host->rrd_memory_mode;