forked from Minki/linux
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