提交 8aced2ea 编写于 作者: P Peter Krempa

qemu: hotplug: Don't leak 'nodename' in qemuDomainChangeMediaBlockdev

qemuDomainDiskGetBackendAlias allocates a copy of the nodename string so
we need to free it at the end.

Found by Coverity.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 c86735e2
......@@ -700,6 +700,7 @@ qemuDomainChangeMediaBlockdev(virQEMUDriverPtr driver,
cleanup:
qemuHotplugDiskSourceDataFree(newbackend);
qemuHotplugDiskSourceDataFree(oldbackend);
VIR_FREE(nodename);
/* caller handles correct exchange of sources */
disk->src = oldsrc;
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册