DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wodkowski, PawelX" <pawelx.wodkowski@intel.com>
To: "Mcnamara, John" <john.mcnamara@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init
Date: Mon, 23 Feb 2015 13:27:42 +0000	[thread overview]
Message-ID: <F6F2A6264E145F47A18AB6DF8E87425D12BACBAA@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <1424697435-13667-1-git-send-email-john.mcnamara@intel.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of John McNamara
> Sent: Monday, February 23, 2015 2:17 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init
> 
> Fix for Klockwork identified issue.
> 
> Signed-off-by: John McNamara <john.mcnamara@intel.com>
> ---
>  lib/librte_pmd_ring/rte_eth_ring.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/librte_pmd_ring/rte_eth_ring.c
> b/lib/librte_pmd_ring/rte_eth_ring.c
> index a23e933..88a1382 100644
> --- a/lib/librte_pmd_ring/rte_eth_ring.c
> +++ b/lib/librte_pmd_ring/rte_eth_ring.c
> @@ -527,7 +527,7 @@ out:
>  static int
>  rte_pmd_ring_devinit(const char *name, const char *params)
>  {
> -	struct rte_kvargs *kvlist;
> +	struct rte_kvargs *kvlist = NULL;
>  	int ret = 0;
>  	struct node_action_list *info = NULL;
> 
> @@ -569,6 +569,7 @@ rte_pmd_ring_devinit(const char *name, const char
> *params)
>  out_free:
>  	rte_free(info);
>  out:
> +	rte_kvargs_free(kvlist);
>  	return ret;
>  }
> 
> --
> 1.7.4.1

This is wrong/incomplete as rte_kvargs_free() is unable to handle NULL argument.
I have patch under review that fix this issue along with rte_kvargs_free().

Pawel

  reply	other threads:[~2015-02-23 13:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 13:17 John McNamara
2015-02-23 13:27 ` Wodkowski, PawelX [this message]
2015-02-24 11:39 ` Mcnamara, John

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=F6F2A6264E145F47A18AB6DF8E87425D12BACBAA@IRSMSX102.ger.corp.intel.com \
    --to=pawelx.wodkowski@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@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).