Skip to content

Commit 8eb65fd

Browse files
WillLesterkuba-moo
authored andcommitted
net/mlx4_core: Add missed mlx4_free_cmd_mailbox()
mlx4_do_mirror_rule() forgets to call mlx4_free_cmd_mailbox() to free the memory region allocated by mlx4_alloc_cmd_mailbox() before an exit. Add the missed call to fix it. Fixes: 78efed2 ("net/mlx4_core: Support mirroring VF DMFS rules on both ports") Signed-off-by: Chuhong Yuan <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2487768 commit 8eb65fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4986,6 +4986,7 @@ static int mlx4_do_mirror_rule(struct mlx4_dev *dev, struct res_fs_rule *fs_rule
49864986

49874987
if (!fs_rule->mirr_mbox) {
49884988
mlx4_err(dev, "rule mirroring mailbox is null\n");
4989+
mlx4_free_cmd_mailbox(dev, mailbox);
49894990
return -EINVAL;
49904991
}
49914992
memcpy(mailbox->buf, fs_rule->mirr_mbox, fs_rule->mirr_mbox_size);

0 commit comments

Comments
 (0)