net/mlx5: Fix dereference on pointer attr after null check
When removing a flow from the slow path fdb, a flow attr struct is allocated for the rule removal process. If the allocation fails the code prints a warning message but continues with the removal flow which include dereferencing a pointer which could be null. Fix this by exiting the function in case the attr allocation failed. Fixes: c620b772 ("net/mlx5: Refactor tc flow attributes structure") Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NAriel Levkovich <lariel@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
Showing
想要评论请 注册 或 登录