diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c index f133bebfdd..085523fe03 100644 --- a/drivers/net/softnic/rte_eth_softnic_cli.c +++ b/drivers/net/softnic/rte_eth_softnic_cli.c @@ -230,6 +230,7 @@ cmd_softnic_pipeline_codegen(struct pmd_internals *softnic __rte_unused, code_file = fopen(tokens[3], "w"); if (!code_file) { snprintf(out, out_size, "Cannot open file %s.\n", tokens[3]); + fclose(spec_file); return; }