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:
Oliver Hartkopp 2017-04-25 08:19:38 +02:00 committed by Marc Kleine-Budde
parent 51f3baad7d
commit a7bbd28f04

View File

@ -903,6 +903,8 @@ static void can_pernet_exit(struct net *net)
}
}
rcu_read_unlock();
kfree(net->can.can_rx_alldev_list);
}
/*