shell: Use g_autofree for strings

This commit is contained in:
Robert Ancell 2019-09-27 11:50:17 +12:00 committed by Georges Basile Stavracas Neto
parent e497ad900d
commit c6965d9e30
3 changed files with 39 additions and 93 deletions

View file

@ -57,7 +57,7 @@ log_handler (const gchar *domain,
g_autoptr(GDateTime) now = NULL;
const gchar *level;
g_autofree gchar *ftime = NULL;
gchar *buffer;
g_autofree gchar *buffer = NULL;
/* Skip ignored log domains */
if (domain && g_strv_contains (ignored_domains, domain))
@ -80,8 +80,6 @@ log_handler (const gchar *domain,
g_io_channel_flush (standard_channel, NULL);
G_UNLOCK (channel_lock);
g_free (buffer);
}
void