session client BUGFIX memory leak
diff --git a/src/session_client.c b/src/session_client.c
index 320e849..7e90fc1 100644
--- a/src/session_client.c
+++ b/src/session_client.c
@@ -2434,11 +2434,11 @@
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_tree(op);
+ lyd_free_all(op);
break;
}
lyd_free_tree(envp);
- lyd_free_tree(op);
+ lyd_free_all(op);
} else if ((msgtype == NC_MSG_ERROR) && (session->status != NC_STATUS_RUNNING)) {
/* quit this thread once the session is broken */
break;