]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
homework: let's simply some code via erase_and_free()
authorLennart Poettering <lennart@poettering.net>
Fri, 15 Oct 2021 16:00:38 +0000 (18:00 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 16 Oct 2021 08:11:42 +0000 (10:11 +0200)
src/home/homework.c

index ae3fffed02c63ed82b0f4e8092fc58b950ec184c..0c77b492e87b7614f465a760ac1f14b80b102331 100644 (file)
@@ -359,8 +359,7 @@ int home_setup_undo(HomeSetup *setup) {
                 setup->crypt_device = NULL;
         }
 
-        explicit_bzero_safe(setup->volume_key, setup->volume_key_size);
-        setup->volume_key = mfree(setup->volume_key);
+        setup->volume_key = erase_and_free(setup->volume_key);
         setup->volume_key_size = 0;
 
         if (setup->do_drop_caches)