]> source.dussan.org Git - tigervnc.git/commitdiff
replace free with delete[]
authorMarcel Schneider <marcel@coopmasters.de>
Tue, 26 Mar 2019 16:58:02 +0000 (17:58 +0100)
committerPierre Ossman <ossman@cendio.se>
Wed, 3 Apr 2019 08:14:46 +0000 (10:14 +0200)
vncviewer/parameters.cxx

index 1458e4b420df990570a8593dfad0815a576ee948..05abd704f529edfc7ff7ca52d83f81d1ddae387c 100644 (file)
@@ -503,7 +503,7 @@ void saveViewerParameters(const char *filename, const char *servername) {
     }
 
     snprintf(filepath, sizeof(filepath), "%sdefault.tigervnc", homeDir);
-    free(homeDir);
+    delete[] homeDir;
   } else {
     snprintf(filepath, sizeof(filepath), "%s", filename);
   }
@@ -560,7 +560,7 @@ char* loadViewerParameters(const char *filename) {
                         "can't obtain home directory path."));
 
     snprintf(filepath, sizeof(filepath), "%sdefault.tigervnc", homeDir);
-    free(homeDir);
+    delete[] homeDir;
   } else {
     snprintf(filepath, sizeof(filepath), "%s", filename);
   }