git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39922c4
)
net/mlx5: fix memory leak when parsing device params
author
Shahaf Shuler
<shahafs@mellanox.com>
Sun, 22 Jan 2017 08:24:47 +0000
(10:24 +0200)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Mon, 30 Jan 2017 21:18:26 +0000
(22:18 +0100)
in case of an error argument list is not freed.
Fixes:
e72dd09b614e
("net/mlx5: add support for configuration through kvargs")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
drivers/net/mlx5/mlx5.c
patch
|
blob
|
history
diff --git
a/drivers/net/mlx5/mlx5.c
b/drivers/net/mlx5/mlx5.c
index
109d957
..
d4bd469
100644
(file)
--- a/
drivers/net/mlx5/mlx5.c
+++ b/
drivers/net/mlx5/mlx5.c
@@
-333,8
+333,10
@@
mlx5_args(struct priv *priv, struct rte_devargs *devargs)
if (rte_kvargs_count(kvlist, params[i])) {
ret = rte_kvargs_process(kvlist, params[i],
mlx5_args_check, priv);
- if (ret != 0)
+ if (ret != 0) {
+ rte_kvargs_free(kvlist);
return ret;
+ }
}
}
rte_kvargs_free(kvlist);