summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-02-28 23:39:55 +0100
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-02-28 23:42:03 +0100
commitc43b2132f37264600cc26e07c8d85dfdd6c969f0 (patch)
treee49f3f4f1369067673628b74d48cc11ce83059da
parentddb64d82708da0cdd0a88fa433260d2e60bffb64 (diff)
core: fix return value on OOM
-rw-r--r--src/core/device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/device.c b/src/core/device.c
index e41ed4149f..eb976b8601 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -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