net/mlx5: fix leak when starvation occurs
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Thu, 17 Nov 2016 09:49:54 +0000 (10:49 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:24:51 +0000 (19:24 +0100)
commitfe5fe3820e504380f4abd15f839f63dd6e5c508f
tree0ffbccc27ad1b301ff9810b8e352d5e62ba27496
parent5ebb74a12c792516d4b8db6b8479a972caa451dc
net/mlx5: fix leak when starvation occurs

The list of segments to free was wrongly manipulated ending by only freeing
the first segment instead of freeing all of them.  The last one still
belongs to the NIC and thus should not be freed.

Fixes: a1bdb71a32da ("net/mlx5: fix crash in Rx")

Reported-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx5/mlx5_rxtx.c