mirror of https://gitee.com/openkylin/libvirt.git
qemu_conf: Don't discard strdup OOM error
After 78d7c3c5
we are strdup()-ing path to qemu-bridge-helper.
However, the check for its return value is missing. So it is
possible we've ignored the OOM error silently.
This commit is contained in:
parent
9d6e56dbce
commit
6ddbabf938
|
@ -241,7 +241,8 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
cfg->bridgeHelperName = strdup("/usr/libexec/qemu-bridge-helper");
|
||||
if (!(cfg->bridgeHelperName = strdup("/usr/libexec/qemu-bridge-helper")))
|
||||
goto no_memory;
|
||||
|
||||
cfg->clearEmulatorCapabilities = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue