]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commitdiff
vfs: zero removed mount slot after shifting to prevent stale data in reused slots...
authorTulio A M Mendes <[email protected]>
Mon, 25 May 2026 20:47:36 +0000 (17:47 -0300)
committerTulio A M Mendes <[email protected]>
Wed, 3 Jun 2026 04:02:35 +0000 (01:02 -0300)
src/kernel/fs.c

index 950c0928f02cf3919f27831881ca22eee3591f74..ccc47e0841f5179cb3949ad1b04a90c9a1e2ab73 100644 (file)
@@ -202,6 +202,7 @@ int vfs_umount_nolock(const char* mountpoint) {
 
     for (int j = idx; j < g_mount_count - 1; j++)
         g_mounts[j] = g_mounts[j + 1];
+    memset(&g_mounts[g_mount_count - 1], 0, sizeof(g_mounts[0]));
     g_mount_count--;
     return 0;
 }