Close the file stream before returning from the function to avoid
memory leak.
Coverity issue: 272605
Fixes:
2b82ef4861c0 ("examples/ip_pipeline: add DSCP table update command")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
if (parse_tokenize_string(line, tokens, &n_tokens)) {
*line_number = l;
+ fclose(f);
return -EINVAL;
}
(tc_queue_id >= RTE_TABLE_ACTION_TC_QUEUE_MAX) ||
(strlen(tokens[2]) != 1)) {
*line_number = l;
+ fclose(f);
return -EINVAL;
}
default:
*line_number = l;
+ fclose(f);
return -EINVAL;
}