提交 a72d25f4 编写于 作者: D Daniel P. Berrange

Fix failure to honour OOM status in qemuParseNBDString

In qemuParseNBDString, if the virURIParse fails, the
error is not reported to the caller. Instead execution
falls through to the non-URI codepath causing memory
leaks later on.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 d7e9f9f7
......@@ -3556,9 +3556,9 @@ qemuParseNBDString(virDomainDiskDefPtr disk)
virURIPtr uri = NULL;
if (strstr(disk->src, "://")) {
uri = virURIParse(disk->src);
if (uri)
return qemuParseDriveURIString(disk, uri, "nbd");
if (!(uri = virURIParse(disk->src)))
return -1;
return qemuParseDriveURIString(disk, uri, "nbd");
}
if (VIR_ALLOC(h) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册