Fix double-free in unit test on Windows.
The LOG_SYSRESULT refers to result twice. Since, in this test, result expands to FindClose(handle), the handle was being freed twice.
This commit is contained in:
parent
a66751870f
commit
c10e6ec19c
@ -635,7 +635,8 @@ static void GetFiles(const string& pattern, vector<string>* files) {
|
|||||||
do {
|
do {
|
||||||
files->push_back(dirname + data.cFileName);
|
files->push_back(dirname + data.cFileName);
|
||||||
} while (FindNextFileA(handle, &data));
|
} while (FindNextFileA(handle, &data));
|
||||||
LOG_SYSRESULT(FindClose(handle));
|
BOOL result = FindClose(handle);
|
||||||
|
LOG_SYSRESULT(result);
|
||||||
#else
|
#else
|
||||||
# error There is no way to do glob.
|
# error There is no way to do glob.
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user