summaryrefslogtreecommitdiffstats
path: root/CommandLine.c
diff options
context:
space:
mode:
Diffstat (limited to 'CommandLine.c')
-rw-r--r--CommandLine.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/CommandLine.c b/CommandLine.c
index 16ded1fa..60582dcf 100644
--- a/CommandLine.c
+++ b/CommandLine.c
@@ -361,7 +361,7 @@ int CommandLine_run(const char* name, int argc, char** argv) {
CRT_done();
if (settings->changed) {
- int r = Settings_write(settings);
+ int r = Settings_write(settings, false);
if (r < 0)
fprintf(stderr, "Can not save configuration to %s: %s\n", settings->filename, strerror(-r));
}
@@ -373,10 +373,12 @@ int CommandLine_run(const char* name, int argc, char** argv) {
MetersPanel_cleanup();
UsersTable_delete(ut);
- Settings_delete(settings);
if (flags.pidMatchList)
Hashtable_delete(flags.pidMatchList);
+ /* Delete Settings last, since it can get accessed in the crash handler */
+ Settings_delete(settings);
+
return 0;
}