data parser FEATURE support bits type for leafs/leaf-lists
diff --git a/src/tree.c b/src/tree.c
index 13e08b1..f0cd6d6 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -1747,6 +1747,11 @@
         case LY_TYPE_STRING:
             lydict_remove(node->schema->module->ctx, ((struct lyd_node_leaf *)node)->value.string);
             break;
+        case LY_TYPE_BITS:
+            if (((struct lyd_node_leaf *)node)->value.bit) {
+                free(((struct lyd_node_leaf *)node)->value.bit);
+            }
+            break;
         default:
             /* TODO */
             break;