mirror of https://gitee.com/openkylin/libvirt.git
udevSetupSystemDev: return if allocation fails
There is no cleanup to be done.
This commit is contained in:
parent
d1d4719814
commit
29c2a9cc21
|
@ -1384,8 +1384,8 @@ static int udevSetupSystemDev(void)
|
|||
virNodeDeviceObjPtr dev = NULL;
|
||||
int ret = -1;
|
||||
|
||||
if (VIR_ALLOC(def) != 0)
|
||||
goto out;
|
||||
if (VIR_ALLOC(def) < 0)
|
||||
return -1;
|
||||
|
||||
if (VIR_STRDUP(def->name, "computer") < 0)
|
||||
goto out;
|
||||
|
|
Loading…
Reference in New Issue