mirror of
https://github.com/profanity-im/profanity.git
synced 2024-09-01 19:24:15 -04:00
Fix errors in log.c
This commit is contained in:
parent
f055faf31c
commit
c08d0e9ce8
@ -188,6 +188,7 @@ void
|
|||||||
log_close(void)
|
log_close(void)
|
||||||
{
|
{
|
||||||
g_string_free(mainlogfile, TRUE);
|
g_string_free(mainlogfile, TRUE);
|
||||||
|
mainlogfile = NULL;
|
||||||
g_time_zone_unref(tz);
|
g_time_zone_unref(tz);
|
||||||
if (logp) {
|
if (logp) {
|
||||||
fclose(logp);
|
fclose(logp);
|
||||||
@ -239,7 +240,7 @@ log_level_from_string(char *log_level)
|
|||||||
static void
|
static void
|
||||||
_rotate_log_file(void)
|
_rotate_log_file(void)
|
||||||
{
|
{
|
||||||
gchar *log_file = mainlogfile->str;
|
gchar *log_file = strdup(mainlogfile->str);
|
||||||
size_t len = strlen(log_file);
|
size_t len = strlen(log_file);
|
||||||
gchar *log_file_new = malloc(len + 4);
|
gchar *log_file_new = malloc(len + 4);
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user