Skip to content

Commit febfd9d

Browse files
QiushiWudavem330
authored andcommitted
net/mlx4_core: fix a memory leak bug.
In function mlx4_opreq_action(), pointer "mailbox" is not released, when mlx4_cmd_box() return and error, causing a memory leak bug. Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can free this pointer. Fixes: fe6f700 ("net/mlx4_core: Respond to operation request by firmware") Signed-off-by: Qiushi Wu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4c64b83 commit febfd9d

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx4/fw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2734,7 +2734,7 @@ void mlx4_opreq_action(struct work_struct *work)
27342734
if (err) {
27352735
mlx4_err(dev, "Failed to retrieve required operation: %d\n",
27362736
err);
2737-
return;
2737+
goto out;
27382738
}
27392739
MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET);
27402740
MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET);

0 commit comments

Comments
 (0)