]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: 'tmp' is always non-NULL 25979/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 9 Jan 2023 02:00:53 +0000 (11:00 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 9 Jan 2023 02:00:56 +0000 (11:00 +0900)
Fixes CID#1502330.

src/boot/bootctl-random-seed.c

index e512b9b68c97b3d9d9682b17afdb32481d47c31a..deda4debd2066692b7469b1a4af1912390555cca 100644 (file)
@@ -169,8 +169,8 @@ int install_random_seed(const char *esp) {
         return set_system_token();
 
 fail:
-        if (tmp)
-                (void) unlinkat(loader_dir_fd, tmp, 0);
+        assert(tmp);
+        (void) unlinkat(loader_dir_fd, tmp, 0);
 
         return r;
 }