Revision: 9990 https://osdn.net/projects/ttssh2/scm/svn/commits/9990 Author: zmatsuo Date: 2022-06-11 00:19:23 +0900 (Sat, 11 Jun 2022) Log Message: ----------- /L オプションでログファイル名を指定したとき発生するメモリリークを修正 Modified Paths: -------------- trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2022-06-04 13:17:22 UTC (rev 9989) +++ trunk/teraterm/teraterm/vtwin.cpp 2022-06-10 15:19:23 UTC (rev 9990) @@ -3342,9 +3342,9 @@ if (ts.LogFNW != NULL) { // "/L"= \x82Ŏw\x92肳\x82\xEA\x82Ă\xA2\x82\xE9\x82Ƃ\xAB(Auto start logging \x82\xA9\x82\xE0\x82\xB5\x82\xEA\x82Ȃ\xA2) // \x8Ew\x92\xE8\x83t\x83@\x83C\x83\x8B\x96\xBC\x82\xF0\x93W\x8AJ\x82\xB7\x82\xE9 - wchar_t *LogFNW = _wcsdup(ts.LogFNW); - ts.LogFNW = FLogGetLogFilename(LogFNW); - free(LogFNW); + wchar_t *LogFNW = FLogGetLogFilename(ts.LogFNW); + free(ts.LogFNW); + ts.LogFNW = LogFNW; } else { // Auto start logging \x82̂Ƃ\xAB("/L"\x82Ŏw\x92肳\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x82Ƃ\xAB)