提交 5c9034bf 编写于 作者: O Osier Yang

qemu: Fix the memory leak

Found by John Ferlan (coverity script)
上级 903f43ce
......@@ -1042,6 +1042,7 @@ qemuAddSharedDisk(virQEMUDriverPtr driver,
if ((VIR_ALLOC(entry) < 0) ||
(VIR_ALLOC_N(entry->domains, 1) < 0) ||
!(entry->domains[0] = strdup(name))) {
qemuSharedDiskEntryFree(entry, NULL);
virReportOOMError();
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册