summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorMarkos Fountoulakis <44345837+mfundul@users.noreply.github.com>2020-06-15 15:18:14 +0300
committerGitHub <noreply@github.com>2020-06-15 15:18:14 +0300
commit1ba9479718857440bd7af7531998261950356044 (patch)
tree328d20499a94d23f5d6485b50f32562f0a663073 /database
parent11a19ccf27d665bf1ad795bb4ed64786540d6212 (diff)
Fix coverity errors CID 359774 and CID 359773 (#9338)
Diffstat (limited to 'database')
-rw-r--r--database/rrdhost.c4
-rw-r--r--database/rrdset.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/database/rrdhost.c b/database/rrdhost.c
index 509e2545af..7f1c4e9de6 100644
--- a/database/rrdhost.c
+++ b/database/rrdhost.c
@@ -245,7 +245,9 @@ RRDHOST *rrdhost_create(const char *hostname,
}
if (host->rrd_memory_mode == RRD_MEMORY_MODE_DBENGINE) {
#ifdef ENABLE_DBENGINE
- uuid_parse(host->machine_guid, host->host_uuid);
+ if (unlikely(-1 == uuid_parse(host->machine_guid, host->host_uuid))) {
+ error("Host machine GUID is not valid.");
+ }
host->objects_nr = 1;
host->compaction_id = 0;
char dbenginepath[FILENAME_MAX + 1];
diff --git a/database/rrdset.c b/database/rrdset.c
index 865a24222f..9bce32e528 100644
--- a/database/rrdset.c
+++ b/database/rrdset.c
@@ -1906,6 +1906,8 @@ void rrdset_done(RRDSET *st) {
metalog_commit_delete_dimension(rd);
} else {
/* Do not delete this dimension */
+ last = rd;
+ rd = rd->next;
continue;
}
}