]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #29748 from poettering/tgtmode
authorLuca Boccassi <bluca@debian.org>
Thu, 2 Nov 2023 17:26:05 +0000 (17:26 +0000)
committerGitHub <noreply@github.com>
Thu, 2 Nov 2023 17:26:05 +0000 (17:26 +0000)
Storage target mode, inspired by "target disk mode" รก la MacOS, but with NVMe-TCP

src/shared/mount-util.c

index af4729b9dc7dc1ee66f9817d739a0db3aa0b5c76..4f2acce513d4109ee0061f57d70a6111089fabbd 100644 (file)
@@ -1378,12 +1378,12 @@ int remount_idmap_fd(
         int *mount_fds = NULL;
         size_t n_mounts_fds = 0;
 
-        CLEANUP_ARRAY(mount_fds, n_mounts_fds, close_many_and_free);
-
         mount_fds = new(int, n);
         if (!mount_fds)
                 return log_oom_debug();
 
+        CLEANUP_ARRAY(mount_fds, n_mounts_fds, close_many_and_free);
+
         for (size_t i = 0; i < n; i++) {
                 int mntfd;