]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Oct 2017 08:39:11 +0000 (10:39 +0200)
commit8f0a7b0262eea5796bc6b9c4c639bf44f395d7ee
tree3831681f9a476ced5379a0697c1d349d96d6f6ab
parent5463bc9a46f2484012ab147c6483aa3973f47665
can: af_can: can_pernet_init(): add missing error handling for kzalloc returning NULL

commit 5a606223c6b5b7560da253ed52e62c67fa18e29b upstream.

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>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/can/af_can.c