OSDN Git Service

net/mlx5: DR, Fix memory leak in modify action destroy
authorAlex Vesker <valex@mellanox.com>
Tue, 29 Oct 2019 11:28:17 +0000 (13:28 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 6 Nov 2019 22:03:54 +0000 (14:03 -0800)
The rewrite data was no freed.

Fixes: 9db810ed2d37 ("net/mlx5: DR, Expose steering action functionality")
Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c

index b74b7d0..004c56c 100644 (file)
@@ -1577,6 +1577,7 @@ int mlx5dr_action_destroy(struct mlx5dr_action *action)
                break;
        case DR_ACTION_TYP_MODIFY_HDR:
                mlx5dr_icm_free_chunk(action->rewrite.chunk);
+               kfree(action->rewrite.data);
                refcount_dec(&action->rewrite.dmn->refcount);
                break;
        default: