yanglint BUGFIX error return on invalid data file
Fixes #1824
diff --git a/tools/lint/main_ni.c b/tools/lint/main_ni.c
index 2f42b20..6acf3eb 100644
--- a/tools/lint/main_ni.c
+++ b/tools/lint/main_ni.c
@@ -880,9 +880,9 @@
/* do the data validation despite the schema was printed */
if (c.data_inputs.size) {
- if (process_data(c.ctx, c.data_type, c.data_merge, c.data_out_format, c.out,
- c.data_parse_options, c.data_validate_options, c.data_print_options,
- &c.data_operational, &c.data_inputs, NULL)) {
+ ret = process_data(c.ctx, c.data_type, c.data_merge, c.data_out_format, c.out, c.data_parse_options,
+ c.data_validate_options, c.data_print_options, &c.data_operational, &c.data_inputs, NULL);
+ if (ret) {
goto cleanup;
}
}