Skip to content

Commit 5f4652f

Browse files
authored
Merge pull request #425 from ldorau/Do_not_use_c_str_beyond_its_scope
Do not use c_str() beyond its scope
2 parents 8aa6060 + 9c59169 commit 5f4652f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/utils/utils_log.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ TEST_F(test, plog_long_error) {
476476
#endif
477477
strerror_ret_static = 0;
478478
helper_test_plog(LOG_DEBUG, "%s", "example log");
479+
strerr = NULL; // do not use tmp.c_str() beyond its scope
479480
}
480481

481482
TEST_F(test, log_pmacros) {

0 commit comments

Comments
 (0)