swap: avoid null pointer dereference

CID#1297436
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-05-11 21:03:50 +02:00
parent ff9b60f38b
commit 12322d4100
+1 -1
View File
@@ -359,7 +359,7 @@ static int swap_setup_unit(
r = unit_name_from_path(what, ".swap", &e);
if (r < 0)
return log_unit_error_errno(u->id, r, "Failed to generate unit name from path: %m");
return log_error_errno(r, "Failed to generate unit name from path: %m");
u = manager_get_unit(m, e);