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

!13260 scsi: target: core: Fix null-ptr-deref in target_alloc_device()

parents e8ec0ad8 92d47000
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -727,7 +727,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)

	dev->queues = kcalloc(nr_cpu_ids, sizeof(*dev->queues), GFP_KERNEL);
	if (!dev->queues) {
		dev->transport->free_device(dev);
		hba->backend->ops->free_device(dev);
		return NULL;
	}