params is not freed if pthread_create() fails. The fix is
straight-forward.
Fixes:
3d09a6e26d8b ("eal: fix threads block on barrier")
Reported-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
pthread_barrier_init(¶ms->configured, NULL, 2);
ret = pthread_create(thread, attr, rte_thread_init, (void *)params);
- if (ret != 0)
+ if (ret != 0) {
+ free(params);
return ret;
+ }
if (name != NULL) {
ret = rte_thread_setname(*thread, name);