summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-05-11 21:01:51 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-05-11 21:03:50 +0200
commit12322d4100b8bd3d85c81fa4b24692c10a8158c2 (patch)
tree41a24d968312d7a010b04a070f04b17da97d9711
parentff9b60f38bf68eba4a47cabff14547d92e083214 (diff)
swap: avoid null pointer dereference
CID#1297436
-rw-r--r--src/core/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/swap.c b/src/core/swap.c
index 3327cd958f..5f98f0b98b 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -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);