Commit 4e2c2d79 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Fix resource leak.

parent eb1cd4ac
...@@ -265,7 +265,6 @@ Settings* Settings_new(ProcessList* pl, Header* header, int cpuCount) { ...@@ -265,7 +265,6 @@ Settings* Settings_new(ProcessList* pl, Header* header, int cpuCount) {
// Transition to new location and delete old configuration file // Transition to new location and delete old configuration file
if (Settings_write(this)) if (Settings_write(this))
unlink(legacyDotfile); unlink(legacyDotfile);
free(legacyDotfile);
} }
} else { } else {
this->changed = true; this->changed = true;
...@@ -280,5 +279,6 @@ Settings* Settings_new(ProcessList* pl, Header* header, int cpuCount) { ...@@ -280,5 +279,6 @@ Settings* Settings_new(ProcessList* pl, Header* header, int cpuCount) {
pl->highlightThreads = false; pl->highlightThreads = false;
} }
} }
free(legacyDotfile);
return this; return this;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment