Skip to content

Commit

Permalink
net/mlx4_en: dereferencing freed memory
Browse files Browse the repository at this point in the history
We dereferenced "mclist" after the kfree().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jul 17, 2012
1 parent 447458c commit 9c64508
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
/* remove from list */
list_del(&mclist->list);
kfree(mclist);
}

if (mclist->action == MCLIST_ADD) {
} else if (mclist->action == MCLIST_ADD) {
/* attach the address */
memcpy(&mc_list[10], mclist->addr, ETH_ALEN);
/* needed for B0 steering support */
Expand Down

0 comments on commit 9c64508

Please sign in to comment.