net/mlx5: fix buffer allocation check in rule cleanup