]> www.infradead.org Git - users/dwmw2/linux.git/commit
net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 27 Dec 2023 07:02:27 +0000 (15:02 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Jan 2024 00:50:08 +0000 (16:50 -0800)
commit89f45c30172c80e55c887f32f1af8e184124577b
tree94662a959883f10dd4e727c18f0f1447b8435dce
parent320fae9edf0184df767fffd5b5d011dc3ed99fb3
net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues

When dma_alloc_coherent() fails, we should free qdev->lrg_buf
to prevent potential memleak.

Fixes: 1357bfcf7106 ("qla3xxx: Dynamically size the rx buffer queue based on the MTU.")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20231227070227.10527-1-dinghao.liu@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/qlogic/qla3xxx.c