1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

less strdup()+free()

Improvement of f8ff93234e

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel 2022-08-19 10:30:16 +02:00
parent 095d40d3bd
commit 25e56fb494

View File

@ -180,13 +180,10 @@ log_init(log_level_t filter, char* log_file)
user_provided_log = TRUE; user_provided_log = TRUE;
} }
gchar* lf = files_get_log_file(log_file); mainlogfile = files_get_log_file(log_file);
logp = fopen(lf, "a"); logp = fopen(mainlogfile, "a");
g_chmod(lf, S_IRUSR | S_IWUSR); g_chmod(mainlogfile, S_IRUSR | S_IWUSR);
mainlogfile = g_strdup(lf);
g_free(lf);
} }
const char* const char*