projects
/
platform
/
upstream
/
glog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a667518
)
Fix double-free in unit test on Windows.
author
Robert Hencke
<robert.hencke@gmail.com>
Sun, 6 Sep 2015 13:53:22 +0000
(09:53 -0400)
committer
Robert Hencke
<robert.hencke@gmail.com>
Sun, 6 Sep 2015 13:53:22 +0000
(09:53 -0400)
The LOG_SYSRESULT refers to result twice. Since, in this test,
result expands to FindClose(handle), the handle was being freed twice.
src/logging_unittest.cc
patch
|
blob
|
history
diff --git
a/src/logging_unittest.cc
b/src/logging_unittest.cc
index
e180567
..
e0e3676
100644
(file)
--- a/
src/logging_unittest.cc
+++ b/
src/logging_unittest.cc
@@
-635,7
+635,8
@@
static void GetFiles(const string& pattern, vector<string>* files) {
do {
files->push_back(dirname + data.cFileName);
} while (FindNextFileA(handle, &data));
- LOG_SYSRESULT(FindClose(handle));
+ BOOL result = FindClose(handle);
+ LOG_SYSRESULT(result);
#else
# error There is no way to do glob.
#endif