diff --git a/Settings.c b/Settings.c index 3198cb6b..d95f8d02 100644 --- a/Settings.c +++ b/Settings.c @@ -265,7 +265,6 @@ Settings* Settings_new(ProcessList* pl, Header* header, int cpuCount) { // Transition to new location and delete old configuration file if (Settings_write(this)) unlink(legacyDotfile); - free(legacyDotfile); } } else { this->changed = true; @@ -280,5 +279,6 @@ Settings* Settings_new(ProcessList* pl, Header* header, int cpuCount) { pl->highlightThreads = false; } } + free(legacyDotfile); return this; }