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:
Michal Privoznik 2013-04-25 13:35:10 +02:00
parent 9d6e56dbce
commit 6ddbabf938

View File

@ -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;