edit diff BUGFIX double free
@@ -2549,11 +2549,10 @@ sr_edit_add_check_same_node_op(sr_session_ctx_t *session, const char *xpath, con
return err_info;
} else if (set->number == 1) {
node = set->set.d[0];
- ly_set_free(set);
-
op = sr_edit_find_oper(node, 1, NULL);
if (!strcmp(op, operation)) {
/* same node with same operation, silently ignore and clear the error */
+ ly_set_free(set);
ly_err_clean(session->conn->ly_ctx, NULL);
return NULL;
} /* else node has a different operation, error */
