* [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init
@ 2015-02-23 13:17 John McNamara
2015-02-23 13:27 ` Wodkowski, PawelX
2015-02-24 11:39 ` Mcnamara, John
0 siblings, 2 replies; 3+ messages in thread
From: John McNamara @ 2015-02-23 13:17 UTC (permalink / raw)
To: dev
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init
2015-02-23 13:17 [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init John McNamara
@ 2015-02-23 13:27 ` Wodkowski, PawelX
2015-02-24 11:39 ` Mcnamara, John
1 sibling, 0 replies; 3+ messages in thread
From: Wodkowski, PawelX @ 2015-02-23 13:27 UTC (permalink / raw)
To: Mcnamara, John, dev
> -----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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init
2015-02-23 13:17 [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init John McNamara
2015-02-23 13:27 ` Wodkowski, PawelX
@ 2015-02-24 11:39 ` Mcnamara, John
1 sibling, 0 replies; 3+ messages in thread
From: Mcnamara, John @ 2015-02-24 11:39 UTC (permalink / raw)
To: dev
> -----Original Message-----
> From: Mcnamara, John
> Sent: Monday, February 23, 2015 1:17 PM
> To: dev@dpdk.org
> Cc: Mcnamara, John
> Subject: [PATCH] ring: fix minor memory leak of kvlist in dev init
>
> Fix for Klocwork identified issue.
Superseded by:
http://dpdk.org/ml/archives/dev/2015-February/013937.html
John
--
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-24 11:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 13:17 [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init John McNamara
2015-02-23 13:27 ` Wodkowski, PawelX
2015-02-24 11:39 ` Mcnamara, John
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).