Commit 64096b60 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

bdev/virtio: check allocation in virtio_user_dev_init()

parent 7aa53faa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -194,6 +194,10 @@ virtio_user_dev_init(char *path, int queue_size)
	uint64_t max_queues;

	dev = calloc(1, sizeof(*dev));
	if (dev == NULL) {
		return NULL;
	}

	vdev = &dev->vdev;
	vdev->is_hw = 0;