DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/softnic: fix file close
@ 2022-09-27  4:42 Harshad Narayane
  2022-10-03 23:26 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Harshad Narayane @ 2022-09-27  4:42 UTC (permalink / raw)
  To: dev; +Cc: Kamalakannan R, Cristian Dumitrescu

Coverity issue: 380976
Fixes: e3be2495 ("net/softnic: add pipeline code generation command")

Fix file close at pipeline code generation.

Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 drivers/net/softnic/rte_eth_softnic_cli.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c
index 7891f2b24f..e46383352b 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;
 	}
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/softnic: fix file close
  2022-09-27  4:42 [PATCH] net/softnic: fix file close Harshad Narayane
@ 2022-10-03 23:26 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2022-10-03 23:26 UTC (permalink / raw)
  To: Harshad Narayane, dev; +Cc: Kamalakannan R, Cristian Dumitrescu

On 9/27/2022 5:42 AM, Harshad Narayane wrote:
> Coverity issue: 380976
> Fixes: e3be2495 ("net/softnic: add pipeline code generation command")
> 
> Fix file close at pipeline code generation.
> 
> Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
> Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Applied to dpdk-next-net/main, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-03 23:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27  4:42 [PATCH] net/softnic: fix file close Harshad Narayane
2022-10-03 23:26 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).