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

2017-01-29 Thread Thomas Monjalon
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(b

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

2017-01-24 Thread 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: