From: srs5694 Date: Sat, 26 Apr 2014 16:53:07 +0000 (-0400) Subject: Fixed memory-allocation bug. X-Git-Url: https://code.delx.au/refind/commitdiff_plain/e0512caf0f64bab257084087d6a1f871f9787e44?hp=0d4453f9c0401fd1e434e3dab4185627585a9c6b Fixed memory-allocation bug. --- 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;