plugins BUGFIX fix realising dynamycally allocated value. Because in some store function is used zero copy value then all strore function have to care about relasing value (call free function) in all cases
diff --git a/src/tree_data.c b/src/tree_data.c
index 60831e1..a8e36c1 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -67,6 +67,10 @@
     }
 
     ret = type->plugin->store(ctx, type, value, value_len, options, format, prefix_data, hints, ctx_node, val, NULL, &err);
+    if (dynamic) {
+        *dynamic = 0;
+    }
+
     if (ret == LY_EINCOMPLETE) {
         if (incomplete) {
             *incomplete = 1;
@@ -81,9 +85,6 @@
         return ret;
     }
 
-    if (dynamic) {
-        *dynamic = 0;
-    }
     return LY_SUCCESS;
 }