From: Ján Tomko Date: Fri, 3 Jun 2016 17:42:11 +0000 (+0200) Subject: udevSetupSystemDev: return if allocation fails X-Git-Tag: v2.0.0-rc1~441 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29c2a9cc21e97a48bdd490b3b604bbd9db725b0f;p=thirdparty%2Flibvirt.git udevSetupSystemDev: return if allocation fails There is no cleanup to be done. --- diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index 8b06ea8242..ebdd4089a7 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -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;