DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Weiguo Li <liwg06@foxmail.com>
Cc: jay.jayatheerthan@intel.com, ganapati.kundapura@intel.com,
	s.v.naga.harish.k@intel.com, dev@dpdk.org
Subject: Re: [PATCH] eventdev/eth_rx: fix memory leak when token parsing finished
Date: Wed, 2 Feb 2022 22:02:21 -0800	[thread overview]
Message-ID: <20220202220221.04c0a04e@hermes.local> (raw)
In-Reply-To: <tencent_59E3BB73044A2421668E27EFF424A2528705@qq.com>

On Wed,  2 Feb 2022 15:13:22 +0800
Weiguo Li <liwg06@foxmail.com> wrote:

> The memory get from strdup should be freed when parameter parsing
> finished, and also should be freed when error occurs.
> 
> Fixes: 814d01709328 ("eventdev/eth_rx: support telemetry")
> Fixes: 9e583185318f ("eventdev/eth_rx: support telemetry")
> 
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>

strdupa() is easier to use here instead of strdup().
Also, the code is not checking for strdup failing...

  parent reply	other threads:[~2022-02-03  6:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02  7:13 Weiguo Li
2022-02-02  7:40 ` [PATCH v2] " Weiguo Li
2022-02-02  7:48   ` Kundapura, Ganapati
2022-02-02  8:25     ` Jayatheerthan, Jay
2022-02-02 14:54     ` Kundapura, Ganapati
2022-02-02 16:47       ` Kundapura, Ganapati
2022-02-03  3:38   ` Weiguo Li
2022-02-03  5:44     ` Kundapura, Ganapati
2022-02-03  8:49   ` [PATCH v4] " Weiguo Li
2022-02-03 13:09     ` Kundapura, Ganapati
2022-02-04  6:54     ` Jayatheerthan, Jay
2022-02-04  7:49     ` [PATCH v5] " Weiguo Li
2022-02-04  7:57       ` Jayatheerthan, Jay
2022-02-04  8:21     ` [PATCH v6] " Weiguo Li
2022-02-04  9:47       ` Jayatheerthan, Jay
2022-02-18  9:39         ` Jerin Jacob
2022-02-22 10:08           ` Kevin Traynor
2022-02-23  7:21             ` Naga Harish K, S V
2022-02-03  6:02 ` Stephen Hemminger [this message]
2022-02-03  7:18 ` [PATCH v3] " Weiguo Li
  -- strict thread matches above, loose matches on Subject: below --
2022-02-02  6:15 [PATCH] " Weiguo Li

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=20220202220221.04c0a04e@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ganapati.kundapura@intel.com \
    --cc=jay.jayatheerthan@intel.com \
    --cc=liwg06@foxmail.com \
    --cc=s.v.naga.harish.k@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).