提交 7a23ba09 编写于 作者: L Laine Stump

qemu: eliminate memory leak in qemuDomainUpdateDeviceConfig

This function was freeing a virDomainNetDef with
VIR_FREE(). virDomainNetDef is a complex structure with many pointers
to other dynamically allocated data; to properly free it
virDomainNetDefFree() must be called instead, otherwise several
strings (and potentially other things) will be leaked.
上级 edb6fc3a
......@@ -5570,7 +5570,7 @@ qemuDomainUpdateDeviceConfig(virDomainDefPtr vmdef,
return -1;
}
VIR_FREE(vmdef->nets[pos]);
virDomainNetDefFree(vmdef->nets[pos]);
vmdef->nets[pos] = net;
dev->data.net = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册