-
由 Xiaoke Wang 提交于
stable inclusion from stable-v5.10.118 commit 9b7f3211064dcb7c59f0fc2f10b26652267d9800 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5L686 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9b7f3211064dcb7c59f0fc2f10b26652267d9800 -------------------------------- [ Upstream commit 34123208 ] kzalloc() is a memory allocation function which can return NULL when some internal memory errors happen. So it is better to check the return value of it to prevent potential wrong memory access or memory leak. Signed-off-by: NXiaoke Wang <xkernel.wang@foxmail.com> Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
98c02a8c