vdpa/mlx5: fix leak on event thread creation
authorDavid Marchand <david.marchand@redhat.com>
Mon, 20 Jun 2022 13:10:44 +0000 (15:10 +0200)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 8 Jul 2022 09:15:32 +0000 (11:15 +0200)
commitea2810fc215dbf748afdaa0e65df50427d2bc058
tree01675561cf1ffab62027abb62310adbc445fc9d2
parentac847b437c4014742ea77858f05d02e1604edac1
vdpa/mlx5: fix leak on event thread creation

As stated in the manual, pthread_attr_init return value should be
checked.
Besides, a pthread_attr_t should be destroyed once unused.

In practice, we may have no leak (from what I read in glibc current code),
but this may change in the future.
Stick to a correct use of the API.

Fixes: 5cf3fd3af4df ("vdpa/mlx5: add CPU core parameter to bind polling thread")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/vdpa/mlx5/mlx5_vdpa_event.c