mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuDomainDetachChrDevice: Don't leak @charAlias
Moreover, since virAsprintf now does report OOM error, there's no need to call virReportOOMError in error path.
This commit is contained in:
@@ -3155,10 +3155,8 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
|
||||
if (qemuBuildChrDeviceStr(&devstr, vm->def, chr, priv->qemuCaps) < 0)
|
||||
return ret;
|
||||
|
||||
if (virAsprintf(&charAlias, "char%s", tmpChr->info.alias) < 0) {
|
||||
virReportOOMError();
|
||||
return ret;
|
||||
}
|
||||
if (virAsprintf(&charAlias, "char%s", tmpChr->info.alias) < 0)
|
||||
goto cleanup;
|
||||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
if (devstr && qemuMonitorDelDevice(priv->mon, tmpChr->info.alias) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user