can: af_can: can_pernet_init(): add missing error handling for kzalloc returning...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 29 Jul 2017 09:51:01 +0000 (11:51 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 19 Oct 2017 11:05:54 +0000 (13:05 +0200)
commit5a606223c6b5b7560da253ed52e62c67fa18e29b
tree098958487eea2734994cbb5131508fa575c8d20e
parentcae1d5b78fb4874086170ad07921bca59ea2e893
can: af_can: can_pernet_init(): add missing error handling for kzalloc returning NULL

This patch adds the missing check and error handling for out-of-memory
situations, when kzalloc cannot allocate memory.

Fixes: cb5635a36776 ("can: complete initial namespace support")
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/af_can.c