swap: avoid null pointer dereference

CID#1297436
This commit is contained in:
Thomas Hindoe Paaboel Andersen 2015-05-11 21:01:51 +02:00
parent ff9b60f38b
commit 12322d4100
1 changed files with 1 additions and 1 deletions

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);