Skip to content

Commit

Permalink
net/failsafe: fix memory leak in args parsing
Browse files Browse the repository at this point in the history
[ upstream commit 2ddf2d7a15deeac3585e08fd7f9ef46ad082b126 ]

Should free the memory which allocated by strdup().

Fixes: a46f8d5 ("net/failsafe: add fail-safe PMD")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
  • Loading branch information
fengchengwen authored and kevintraynor committed Mar 5, 2024
1 parent bb7030a commit b8422c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/failsafe/failsafe_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fs_parse_device_param(struct rte_eth_dev *dev, const char *param,
goto free_args;
} else {
ERROR("Unrecognized device type: %.*s", (int)b, param);
return -EINVAL;
ret = -EINVAL;
}
free_args:
free(args);
Expand Down

0 comments on commit b8422c5

Please sign in to comment.