mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00: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:
parent
23e938ee63
commit
b7658f6234
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user