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 e41ed4149fcb8f33eb1fb881f33a487240309097..eb976b8601199840d5e4e747b75d71cc52b48e35 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);
                         j = strjoin(model, " ", label, NULL);
                         if (j)
                                 r = unit_set_description(u, j);
+                        else
+                                r = -ENOMEM;
                 } else
                         r = unit_set_description(u, model);
         } else
                 } else
                         r = unit_set_description(u, model);
         } else