core: fix return value on OOM

This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-02-28 23:42:03 +01:00
parent ddb64d8270
commit c43b2132f3
+2
View File
@@ -209,6 +209,8 @@ static int device_update_description(Unit *u, struct udev_device *dev, const cha
j = strjoin(model, " ", label, NULL);
if (j)
r = unit_set_description(u, j);
else
r = -ENOMEM;
} else
r = unit_set_description(u, model);
} else