DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Harshad Narayane <harshad.suresh.narayane@intel.com>
Cc: dev@dpdk.org, Kamalakannan R <kamalakannan.r@intel.com>,
	Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: Re: [PATCH] examples/pipeline: fix file close
Date: Wed, 05 Oct 2022 14:34:40 +0200	[thread overview]
Message-ID: <2064490.htQpZWrp2x@thomas> (raw)
In-Reply-To: <20220927043516.366922-1-harshad.suresh.narayane@intel.com>

27/09/2022 06:35, Harshad Narayane:
> Coverity issue: 380860
> Fixes: 9043f66a ("examples/pipeline: add command for code generation")
> 
> 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>
> ---
> --- a/examples/pipeline/cli.c
> +++ b/examples/pipeline/cli.c
> @@ -545,6 +545,7 @@ cmd_pipeline_codegen(char **tokens,
>  	code_file = fopen(tokens[3], "w");
>  	if (!code_file) {
>  		snprintf(out, out_size, "Cannot open file %s.\n", tokens[3]);
> +		fclose(spec_file);
>  		return;
>  	}


Reordered lines in the commit log and applied, thanks.
Note: this is not fixing "close", it was missing,
but it is fixing a leak.



  reply	other threads:[~2022-10-05 12:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27  4:35 Harshad Narayane
2022-10-05 12:34 ` Thomas Monjalon [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-09-27  2:29 Harshad Narayane
2022-09-26 10:41 Harshad Narayane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2064490.htQpZWrp2x@thomas \
    --to=thomas@monjalon.net \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=harshad.suresh.narayane@intel.com \
    --cc=kamalakannan.r@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).