[PATCH] eventdev/eth_rx: fix memory leak when token parsing finished
Stephen Hemminger
stephen at networkplumber.org
Thu Feb 3 07:02:21 CET 2022
On Wed, 2 Feb 2022 15:13:22 +0800
Weiguo Li <liwg06 at 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 at foxmail.com>
strdupa() is easier to use here instead of strdup().
Also, the code is not checking for strdup failing...
More information about the dev
mailing list