提交 edcd3ed4 编写于 作者: M Michal Privoznik

qemuDomainDetachDeviceConfig: Don't free device from @dev

https://bugzilla.redhat.com/show_bug.cgi?id=1591561

For reasons I don't understand my original patch of 75f0fd51
freed not only the chardev from domain but also the one from
passed virDomainDeviceDefPtr. This caused no troubles until now,
because those two pointers were separate, but after I've
introduced virDomainDetachDeviceAlias() they became the same
resulting in double free on detach.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 2b43314d
......@@ -8241,8 +8241,6 @@ qemuDomainDetachDeviceConfig(virDomainDefPtr vmdef,
return -1;
virDomainChrDefFree(chr);
virDomainChrDefFree(dev->data.chr);
dev->data.chr = NULL;
break;
case VIR_DOMAIN_DEVICE_FS:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册