Found by nullfree.cocci. Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c index e025be47d277..e06d6afb676f 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c @@ -285,8 +285,7 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index) if (virtq->umems[i].obj) claim_zero(mlx5_glue->devx_umem_dereg (virtq->umems[i].obj)); - if (virtq->umems[i].buf) - rte_free(virtq->umems[i].buf); + rte_free(virtq->umems[i].buf); virtq->umems[i].size = 0; virtq->umems[i].obj = NULL; virtq->umems[i].buf = NULL; -- 2.35.1