diff options
-rw-r--r-- | src/log.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/log.c b/src/log.c index b85f1005..df93dd15 100644 --- a/src/log.c +++ b/src/log.c @@ -180,13 +180,10 @@ log_init(log_level_t filter, char* log_file) user_provided_log = TRUE; } - gchar* lf = files_get_log_file(log_file); + mainlogfile = files_get_log_file(log_file); - logp = fopen(lf, "a"); - g_chmod(lf, S_IRUSR | S_IWUSR); - mainlogfile = g_strdup(lf); - - g_free(lf); + logp = fopen(mainlogfile, "a"); + g_chmod(mainlogfile, S_IRUSR | S_IWUSR); } const char* |