# HG changeset patch # User Matti Hamalainen # Date 1514600789 -7200 # Node ID f40d5613c7539be6f1d2817897221de2d9bef1b7 # Parent cfbc5ddf74e5c3f7ed091e4c9b0c7b96669a08e9 Use th_free_r(). diff -r cfbc5ddf74e5 -r f40d5613c753 main.c --- a/main.c Wed Oct 25 18:23:32 2017 +0300 +++ b/main.c Sat Dec 30 04:26:29 2017 +0200 @@ -1628,8 +1628,7 @@ if (!again) { - th_free(previous); - previous = NULL; + th_free_r(&previous); } } @@ -1916,8 +1915,7 @@ error: th_free(path); - th_free(win->logFilename); - win->logFilename = NULL; + th_free_r(&win->logFilename); if (win->logFile != NULL) fclose(win->logFile); #ifndef TH_PLAT_WINDOWS @@ -1935,8 +1933,7 @@ fclose(win->logFile); win->logFile = NULL; - th_free(win->logFilename); - win->logFilename = NULL; + th_free_r(&win->logFilename); }