session client BUGFIX memory leak
diff --git a/src/session_client.c b/src/session_client.c
index ce2a565..e244fb3 100644
--- a/src/session_client.c
+++ b/src/session_client.c
@@ -2452,10 +2452,12 @@
if (msgtype == NC_MSG_NOTIF) {
notif_clb(session, envp, op, user_data);
if (!strcmp(op->schema->name, "notificationComplete") && !strcmp(op->schema->module->name, "nc-notifications")) {
- lyd_free_tree(envp);
+ lyd_free_all(envp);
+ lyd_free_all(op);
break;
}
- lyd_free_tree(envp);
+ lyd_free_all(envp);
+ lyd_free_all(op);
} else if ((msgtype == NC_MSG_ERROR) && (session->status != NC_STATUS_RUNNING)) {
/* quit this thread once the session is broken */
break;