udevSetupSystemDev: return if allocation fails

There is no cleanup to be done.
This commit is contained in:
Ján Tomko 2016-06-03 19:42:11 +02:00
parent d1d4719814
commit 29c2a9cc21

View File

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