Unverified Commit edfa8c5c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9385 vfio/pci: fix potential memory leak in vfio_intx_enable()

Merge Pull Request from: @ci-robot 
 
PR sync from: Huang Xiaojia <huangxiaojia2@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/EY23OIS4KDLFTRMBBXA65PSDXQWDPHRC/ 
*** BLURB HERE ***

Ye Bin (1):
  vfio/pci: fix potential memory leak in vfio_intx_enable()


-- 
2.34.1
 
https://gitee.com/src-openeuler/kernel/issues/IA7D2E 
 
Link:https://gitee.com/openeuler/kernel/pulls/9385

 

Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 05960a0a 40ce6f37
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -181,8 +181,10 @@ static int vfio_intx_enable(struct vfio_pci_device *vdev,
		return -ENOMEM;

	vdev->ctx = kzalloc(sizeof(struct vfio_pci_irq_ctx), GFP_KERNEL);
	if (!vdev->ctx)
	if (!vdev->ctx) {
		kfree(name);
		return -ENOMEM;
	}

	vdev->num_ctx = 1;