data type CHANGE clarify and simplify information about lyd_value's type
diff --git a/src/tree_data.c b/src/tree_data.c
index c9ef10f..19a3549 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -163,7 +163,9 @@
     ctx = node->schema->module->ctx;
 
     type = ((struct lysc_node_leaf*)node->schema)->type;
-    node->value.plugin = type->plugin;
+    if (!second) {
+        node->value.realtype = type;
+    }
     rc = type->plugin->store(ctx, type, value, value_len, options, get_prefix, parser, format,
                              trees ? (void*)node : (void*)node->schema, trees,
                              &node->value, NULL, &err);
@@ -286,7 +288,7 @@
     }
 
 cleanup:
-    type->plugin->free(ctx, type, &data);
+    type->plugin->free(ctx, &data);
 
     return ret;
 }