@cryptotaxi247 / netdata-1 / commits / 1ba947971

Fix coverity errors CID 359774 and CID 359773 (#9338)

Markos Fountoulakis committed Jun 15, 2020 at 15:18 UTC 1ba9479718857440bd7af7531998261950356044
2 files changed +5 -1
database/rrdhost.c
+3 -1
@@ -245,7 +245,9 @@ RRDHOST *rrdhost_create(const char *hostname,
245 }
246 if (host->rrd_memory_mode == RRD_MEMORY_MODE_DBENGINE) {
247 #ifdef ENABLE_DBENGINE
248 - uuid_parse(host->machine_guid, host->host_uuid);
248 + if (unlikely(-1 == uuid_parse(host->machine_guid, host->host_uuid))) {
249 + error("Host machine GUID is not valid.");
250 + }
251 host->objects_nr = 1;
252 host->compaction_id = 0;
253 char dbenginepath[FILENAME_MAX + 1];
database/rrdset.c
+2
@@ -1906,6 +1906,8 @@ void rrdset_done(RRDSET *st) {
1906 metalog_commit_delete_dimension(rd);
1907 } else {
1908 /* Do not delete this dimension */
1909 + last = rd;
1910 + rd = rd->next;
1911 continue;
1912 }
1913 }