mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
can: fix memory leak in initial namespace support
The can_rx_alldev_list is a per-net data structure now and allocated in can_pernet_init(). Make sure the memory is free'd in can_pernet_exit() too. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
51f3baad7d
commit
a7bbd28f04
@ -903,6 +903,8 @@ static void can_pernet_exit(struct net *net)
|
||||
}
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
kfree(net->can.can_rx_alldev_list);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user