]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
swap: avoid null pointer dereference
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 11 May 2015 19:01:51 +0000 (21:01 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 11 May 2015 19:03:50 +0000 (21:03 +0200)
CID#1297436

src/core/swap.c

index 3327cd958f14bcf1e146135ca0a52ba41bfad046..5f98f0b98bedd54b59414f1c6b91f2169043c3cd 100644 (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);