diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-07-10 16:34:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-17 01:58:07 -0400 |
commit | 9c64508af2c171f57a198729c59a7a6f6998b3a1 (patch) | |
tree | ecd55407d2b2d16798a4b717eec0f76842319c08 /drivers/net/ethernet/mellanox/mlx4 | |
parent | 447458c01f4c765ab37ac7b380e60d977daae4c5 (diff) |
net/mlx4_en: dereferencing freed memory
We dereferenced "mclist" after the kfree().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 94375a8c6d42..4ce5ca81a010 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |||
@@ -503,9 +503,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work) | |||
503 | /* remove from list */ | 503 | /* remove from list */ |
504 | list_del(&mclist->list); | 504 | list_del(&mclist->list); |
505 | kfree(mclist); | 505 | kfree(mclist); |
506 | } | 506 | } else if (mclist->action == MCLIST_ADD) { |
507 | |||
508 | if (mclist->action == MCLIST_ADD) { | ||
509 | /* attach the address */ | 507 | /* attach the address */ |
510 | memcpy(&mc_list[10], mclist->addr, ETH_ALEN); | 508 | memcpy(&mc_list[10], mclist->addr, ETH_ALEN); |
511 | /* needed for B0 steering support */ | 509 | /* needed for B0 steering support */ |