Fix use before free in boot_cbfs (boot.c).
authorKevin O'Connor <kevin@koconnor.net>
Sun, 13 Dec 2009 16:19:01 +0000 (11:19 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 13 Dec 2009 16:19:01 +0000 (11:19 -0500)
src/boot.c

index d80eae491c9c5ea16d9644d6d11d8d2f6ca1c052..05de7157f6234a7f0b6f9f59c468621e1edb21f0 100644 (file)
@@ -422,7 +422,7 @@ boot_cbfs(struct ipl_entry_s *ie)
     if (! CONFIG_COREBOOT_FLASH)
         return;
     int count = ie->subchoice;
-    struct cbfs_file *file;
+    struct cbfs_file *file = NULL;
     for (;;) {
         file = cbfs_findprefix("img/", file);
         if (!file)