[dpdk-dev] [PATCH] eal: reset driver name pointer on failure

Thomas Monjalon thomas.monjalon at 6wind.com
Sun Jan 29 23:35:39 CET 2017

2017-01-24 21:26, Emmanuel Roullit:
> The pointer set by strdup() needs to be cleared on failure to avoid a
> potential double-free from the caller.
> Found with clang static analysis:
> lib/librte_eal/common/eal_common_devargs.c:123:2:
> warning: Attempt to free released memory
>         free(buf);
>         ^~~~~~~~~
> Fixes: 3fe2e5fec82b ("eal: fix argument parsing check")

The real bug origin is:
Fixes: 0fe11ec592b2 ("eal: add vdev init and uninit")

> Signed-off-by: Emmanuel Roullit <emmanuel.roullit at gmail.com>

Applied, thanks

More information about the dev mailing list