DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Yangchao Zhou <zhouyates@gmail.com>
Cc: dev@dpdk.org, anatoly.burakov@intel.com
Subject: Re: [dpdk-dev] [PATCH v3] mem: fix memory leaks of hugedir and replace snprintf
Date: Wed, 18 Apr 2018 11:00:50 +0200	[thread overview]
Message-ID: <2393278.IC1XLxtKtA@xps> (raw)
In-Reply-To: <1524020953-27227-1-git-send-email-zhouyates@gmail.com>

18/04/2018 05:09, Yangchao Zhou:
> The hugedir returned by get_hugepage_dir is allocated by strdup
>  but not released. Replace snprintf with a more suitable strlcpy.
> 
> Coverity issue: 272585
> Fixes: cb97d93e9d3b ("mem: share hugepage info primary and secondary")
> 
> Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

There was a misunderstanding.
You replaced some snprintf which were not involved in the leaks.
But I think it's fine.

Applied, thanks

  reply	other threads:[~2018-04-18  9:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17  9:43 [dpdk-dev] [PATCH] mem: memory leaks of hubedir caused by strdup Yangchao Zhou
2018-04-17  9:57 ` Burakov, Anatoly
2018-04-17 10:06   ` [dpdk-dev] [PATCH v2] " Yangchao Zhou
2018-04-17 10:24     ` Thomas Monjalon
2018-04-17 10:31       ` Burakov, Anatoly
2018-04-17 11:16         ` zhouyangchao
2018-04-17 11:47           ` Thomas Monjalon
2018-04-17 14:02             ` Burakov, Anatoly
2018-04-18  3:09               ` [dpdk-dev] [PATCH v3] mem: fix memory leaks of hugedir and replace snprintf Yangchao Zhou
2018-04-18  9:00                 ` Thomas Monjalon [this message]
2018-04-18  9:25                   ` Burakov, Anatoly

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=2393278.IC1XLxtKtA@xps \
    --to=thomas@monjalon.net \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=zhouyates@gmail.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).