messages server BUGFIX memory leak for actions
diff --git a/src/messages_server.c b/src/messages_server.c
index 7a39e69..ec722be 100644
--- a/src/messages_server.c
+++ b/src/messages_server.c
@@ -793,7 +793,9 @@
     }
 
     lyd_free_tree(rpc->envp);
-    lyd_free_tree(rpc->rpc);
+
+    /* may be action */
+    lyd_free_all(rpc->rpc);
 
     free(rpc);
 }