summaryrefslogtreecommitdiffstats
path: root/database/rrdset.c
diff options
context:
space:
mode:
Diffstat (limited to 'database/rrdset.c')
-rw-r--r--database/rrdset.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/database/rrdset.c b/database/rrdset.c
index 4bf1423ef7..6a437555b5 100644
--- a/database/rrdset.c
+++ b/database/rrdset.c
@@ -337,8 +337,6 @@ static inline void last_updated_time_align(RRDSET *st) {
void rrdset_free(RRDSET *st) {
if(unlikely(!st)) return;
- rrdcontext_removed_rrdset(st);
-
RRDHOST *host = st->rrdhost;
rrdhost_check_wrlock(host); // make sure we have a write lock on the host
@@ -389,6 +387,9 @@ void rrdset_free(RRDSET *st) {
rrdset_unlock(st);
+ // this has to be after the dimensions are freed
+ rrdcontext_removed_rrdset(st);
+
// ------------------------------------------------------------------------
// free it