Skip to content

Commit

Permalink
net: use the right variant of kfree
Browse files Browse the repository at this point in the history
kvzalloc'ed memory should be kvfree'd.

Fixes: e817f85 ("xdp: generic XDP handling of xdp_rxq_info")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
  • Loading branch information
Jakub Kicinski authored and Daniel Borkmann committed Jan 10, 2018
1 parent 5896351 commit 141b52a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -7645,7 +7645,7 @@ static int netif_alloc_rx_queues(struct net_device *dev)
/* Rollback successful reg's and free other resources */
while (i--)
xdp_rxq_info_unreg(&rx[i].xdp_rxq);
kfree(dev->_rx);
kvfree(dev->_rx);
dev->_rx = NULL;
return err;
}
Expand Down

0 comments on commit 141b52a

Please sign in to comment.