Googletest export
Avoid segfault on null premature_exit_filepath. PiperOrigin-RevId: 395965853
This commit is contained in:
parent
955c7f837e
commit
159c9ad23e
@ -5038,7 +5038,7 @@ class ScopedPrematureExitFile {
|
|||||||
// create the file with a single "0" character in it. I/O
|
// create the file with a single "0" character in it. I/O
|
||||||
// errors are ignored as there's nothing better we can do and we
|
// errors are ignored as there's nothing better we can do and we
|
||||||
// don't want to fail the test because of this.
|
// don't want to fail the test because of this.
|
||||||
FILE* pfile = posix::FOpen(premature_exit_filepath, "w");
|
FILE* pfile = posix::FOpen(premature_exit_filepath_.c_str(), "w");
|
||||||
fwrite("0", 1, 1, pfile);
|
fwrite("0", 1, 1, pfile);
|
||||||
fclose(pfile);
|
fclose(pfile);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user