]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fs/bfs: Fix improper grub_free() on non-existing files
authorVladimir Serbinenko <phcoder@gmail.com>
Thu, 16 May 2024 18:37:49 +0000 (21:37 +0300)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 6 Jun 2024 14:55:15 +0000 (16:55 +0200)
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/bfs.c

index 07cb3e3acf35deb9f46db56aeca06e926154a803..9bc478ce8f9120a9222497f586b2785197da4933 100644 (file)
@@ -808,7 +808,7 @@ find_file (const char *path, grub_disk_t disk,
     .disk = disk,
     .sb = sb,
   };
-  struct grub_fshelp_node *found;
+  struct grub_fshelp_node *found = NULL;
 
   err = read_extent (disk, sb, &sb->root_dir, 0, 0, &root.ino,
                     sizeof (root.ino));