summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/db.c b/src/common/db.c
index 4dcf1d0b0..550bfd382 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -1976,13 +1976,13 @@ static int db_obj_vclear(DBMap* self, DBApply func, va_list args)
node->deleted = 1;
}
DB_COUNTSTAT(db_node_free);
- ers_free(db->nodes, node);
if (parent) {
if (parent->left == node)
parent->left = NULL;
else
parent->right = NULL;
}
+ ers_free(db->nodes, node);
node = parent;
}
db->ht[i] = NULL;