From e0512caf0f64bab257084087d6a1f871f9787e44 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Sat, 26 Apr 2014 12:53:07 -0400 Subject: [PATCH] Fixed memory-allocation bug. --- NEWS.txt | 6 ++++++ refind/main.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index a215802..c0f1dcb 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,3 +1,9 @@ +0.7.10 (?/??/2014): +------------------- + +- Fixed memory-allocation bug that could cause error message displays, + and possibly hangs, when re-scanning boot loaders. + 0.7.9 (4/20/2014): ------------------ diff --git a/refind/main.c b/refind/main.c index 4a1b57a..ae35fa3 100644 --- a/refind/main.c +++ b/refind/main.c @@ -159,7 +159,7 @@ static VOID AboutrEFInd(VOID) { if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.9"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.9.1"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2014 Roderick W. Smith"); @@ -1110,7 +1110,7 @@ static BOOLEAN ShouldScan(REFIT_VOLUME *Volume, CHAR16 *Path) { VolName = NULL; // See if Volume is in GlobalConfig.DontScanDirs.... - while ((DontScanDir = FindCommaDelimited(GlobalConfig.DontScanDirs, i++)) && ScanIt) { + while (ScanIt && (DontScanDir = FindCommaDelimited(GlobalConfig.DontScanDirs, i++))) { SplitVolumeAndFilename(&DontScanDir, &VolName); CleanUpPathNameSlashes(DontScanDir); VolumeNumberToName(Volume, &VolName); @@ -1124,6 +1124,7 @@ static BOOLEAN ShouldScan(REFIT_VOLUME *Volume, CHAR16 *Path) { MyFreePool(DontScanDir); MyFreePool(VolName); DontScanDir = NULL; + VolName = NULL; } // while() return ScanIt; -- 2.39.2