chiark / gitweb /
core: fix return value on OOM
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 28 Feb 2015 22:39:55 +0000 (23:39 +0100)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 28 Feb 2015 22:42:03 +0000 (23:42 +0100)
src/core/device.c

index e41ed41..eb976b8 100644 (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