device: avoid null pointer dereference

This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-05-06 19:58:03 +02:00
parent f7e3c6f5f8
commit 7f629b74c4
+1 -1
View File
@@ -310,7 +310,7 @@ static int device_setup_unit(Manager *m, struct udev_device *dev, const char *pa
r = unit_name_from_path(path, ".device", &e);
if (r < 0)
return log_unit_error_errno(u->id, r, "Failed to generate device name: %m");
return log_error_errno(r, "Failed to generate unit name from device path: %m");
u = manager_get_unit(m, e);