]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: fix memory leak in mlx5_fw_fatal_reporter_dump
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Fri, 27 Sep 2019 22:37:28 +0000 (17:37 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 18 Oct 2019 19:11:55 +0000 (12:11 -0700)
commit0598c7fac023307d33a48fc7f24e3d26a48e8b17
treebd5654f3c40669801442c18966b2bc9bed7be91c
parentaade7e5257aca82379a272c23f62c50d242a2fdf
net/mlx5: fix memory leak in mlx5_fw_fatal_reporter_dump

In mlx5_fw_fatal_reporter_dump if mlx5_crdump_collect fails the
allocated memory for cr_data must be released otherwise there will be
memory leak. To fix this, this commit changes the return instruction
into goto error handling.

Fixes: e9f8255857c2 ("net/mlx5: Add support for FW fatal reporter dump")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/health.c