]> git.baikalelectronics.ru Git - kernel.git/commit
s390/ap: fix memory leak in ap_init_qci_info()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 14 Nov 2022 11:08:29 +0000 (11:08 +0000)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 23 Nov 2022 15:26:21 +0000 (16:26 +0100)
commitc47d8a526d468e195e1fde1bd381896f84057cab
tree5777b7b7b71ba6bc541f6f20d626b17097ab0805
parentc3a1ff502bff39b14ccf73f97ea67251d6da657c
s390/ap: fix memory leak in ap_init_qci_info()

If kzalloc() for 'ap_qci_info_old' failed, 'ap_qci_info' shold be
freed before return. Otherwise it is a memory leak.

Link: https://lore.kernel.org/r/20221114110830.542246-1-weiyongjun@huaweicloud.com
Fixes: d6f1523ce90d ("s390/ap: notify drivers on config changed and scan complete callbacks")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
drivers/s390/crypto/ap_bus.c