grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Vladimir Serbinenko
Subject: [PATCH] bfs: Fix improper free() on non-existing files
Date: Thu, 16 May 2024 21:37:49 +0300

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
 grub-core/fs/bfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/fs/bfs.c b/grub-core/fs/bfs.c
index 07cb3e3ac..9bc478ce8 100644
--- a/grub-core/fs/bfs.c
+++ b/grub-core/fs/bfs.c
@@ -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));
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]