]> code.delx.au - refind/blobdiff - refind/lib.c
Fixed refind-install bug that could cause mountesp script to be
[refind] / refind / lib.c
index 9c7d1f6e3f08682538cff3664c5ecd2c3ba62368..f38ac64d2706618077c519efe218757a999ea2da 100644 (file)
@@ -1094,12 +1094,12 @@ VOID ScanVolumes(VOID)
 
     // get all filesystem handles
     Status = LibLocateHandle(ByProtocol, &BlockIoProtocol, NULL, &HandleCount, &Handles);
-    UuidList = AllocateZeroPool(sizeof(EFI_GUID) * HandleCount);
     if (Status == EFI_NOT_FOUND) {
         return;  // no filesystems. strange, but true...
     }
     if (CheckError(Status, L"while listing all file systems"))
         return;
+    UuidList = AllocateZeroPool(sizeof(EFI_GUID) * HandleCount);
 
     // first pass: collect information about all handles
     for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) {