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

!6193 uio_hv_generic: Fix another memory leak in error handling paths

parents b59729dd 68ed0718
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ hv_uio_probe(struct hv_device *dev,
	pdata->recv_buf = vzalloc(RECV_BUFFER_SIZE);
	if (pdata->recv_buf == NULL) {
		ret = -ENOMEM;
		goto fail_close;
		goto fail_free_ring;
	}

	ret = vmbus_establish_gpadl(channel, pdata->recv_buf,
@@ -351,6 +351,8 @@ hv_uio_probe(struct hv_device *dev,

fail_close:
	hv_uio_cleanup(dev, pdata);
fail_free_ring:
	vmbus_free_ring(dev->channel);
fail:
	kfree(pdata);