changeset 677:f40d5613c753

Use th_free_r().
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 30 Dec 2017 04:26:29 +0200
parents cfbc5ddf74e5
children 75daa6ec65df
files main.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }