From 29c2a9cc21e97a48bdd490b3b604bbd9db725b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Fri, 3 Jun 2016 19:42:11 +0200 Subject: [PATCH] udevSetupSystemDev: return if allocation fails There is no cleanup to be done. --- src/node_device/node_device_udev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- GitLab