patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Pattan, Reshma" <reshma.pattan@intel.com>
To: "Korynkevych, RomanX" <romanx.korynkevych@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
	"Tahhan, Maryam" <maryam.tahhan@intel.com>,
	"Korynkevych, RomanX" <romanx.korynkevych@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v1 1/1] app/procinfo: resource leak fix.
Date: Tue, 9 May 2017 13:38:37 +0000	[thread overview]
Message-ID: <3AEA2BF9852C6F48A459DA490692831F0113963F@irsmsx110.ger.corp.intel.com> (raw)
In-Reply-To: <1493995649-3220-1-git-send-email-romanx.korynkevych@intel.com>

Hi,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Roman Korynkevych
> Sent: Friday, May 5, 2017 3:47 PM
> To: dev@dpdk.org
> Cc: Van Haaren, Harry <harry.van.haaren@intel.com>; Tahhan, Maryam
> <maryam.tahhan@intel.com>; Korynkevych, RomanX
> <romanx.korynkevych@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v1 1/1] app/procinfo: resource leak fix.
> 
> Coverity issue: 143256
> Fixes: 2deb6b5246d7706448d070335b329d1acb754cee ("app/procinfo: add
> collectd format and host id")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Roman Korynkevych <romanx.korynkevych@intel.com>
> ---
>  app/proc_info/main.c | 21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/app/proc_info/main.c b/app/proc_info/main.c index
> 17a1c87..3d0b621 100644
> --- a/app/proc_info/main.c
> +++ b/app/proc_info/main.c

1)You need to close the stdout_fd even inside proc_info_preparse_args() before return -1;
(or) 

inside below piece of code in main().
ret = proc_info_preparse_args(argc, argv);
        if (ret < 0) {
                printf("Failed to parse arguments\n");
                return -1;
        }

2)Also if  stdout_fd = dup(STDOUT_FILENO);  can return negative value, You may need to exit then? If so can you fix that code as well.

Thanks,
Reshma

      reply	other threads:[~2017-05-09 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 14:47 [dpdk-stable] " Roman Korynkevych
2017-05-09 13:38 ` Pattan, Reshma [this message]

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=3AEA2BF9852C6F48A459DA490692831F0113963F@irsmsx110.ger.corp.intel.com \
    --to=reshma.pattan@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=maryam.tahhan@intel.com \
    --cc=romanx.korynkevych@intel.com \
    --cc=stable@dpdk.org \
    /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).