about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 33367743..99ccfbc0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -60,7 +60,7 @@
 #include "command/cmd_defs.h"
 
 static gboolean version = FALSE;
-static char *log = "INFO";
+static char *log = NULL;
 static char *log_file = NULL;
 static char *account_name = NULL;
 static char *config_file = NULL;
@@ -175,7 +175,17 @@ main(int argc, char **argv)
         return 0;
     }
 
-    prof_run(log, account_name, config_file, log_file);
+    prof_run(log ? log : "INFO", account_name, config_file, log_file);
+
+    /* Free resources allocated by GOptionContext */
+    if (log)
+        g_free(log);
+    if (account_name)
+        g_free(account_name);
+    if (config_file)
+        g_free(config_file);
+    if (log_file)
+        g_free(log_file);
 
     return 0;
 }