Skip to contentSkip to conversation

bfs: Fix improper free() on non-existing files

PATCH In review Vladimir Serbinenko 2 participants 2 messages May 16, 2024 – Jun 3, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bfs: Fix improper free() on non-existing files

---
 grub-core/fs/bfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/fs/bfs.c +1 -1
index 07cb3e3ac..9bc478ce8 100644
@@ -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));
Signature · 7 lines
2.39.2


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel