diff --git a/src/supplemental/nanolib/mqtt_db.c b/src/supplemental/nanolib/mqtt_db.c index 3c4a4af9e..3d8bfd197 100644 --- a/src/supplemental/nanolib/mqtt_db.c +++ b/src/supplemental/nanolib/mqtt_db.c @@ -905,9 +905,8 @@ delete_dbtree_node(dbtree_node *node, size_t index) log_debug("Delete node: [%s]", node_t->topic); cvector_free(node_t->child); cvector_free(node_t->clients); - free(node_t->topic); cvector_erase(node->child, index); - free(node_t); + dbtree_node_free(node_t); node_t = NULL; if (index == 0) { if (node->plus >= 0) {