Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntenore Gatta <antenore@simbiosi.org>2020-06-18 16:19:21 +0300
committerAntenore Gatta <antenore@simbiosi.org>2020-06-18 16:19:21 +0300
commit6cb6d14327959be27f72df787c7f014242b66561 (patch)
tree996980d86c4080459ee804efbe1aab5e2305a403 /src/remmina_log.c
parent698cdc0c777c19c94196ebf158628f4c1267a359 (diff)
Using g_autofree when possible
Signed-off-by: Antenore Gatta <antenore@simbiosi.org>
Diffstat (limited to 'src/remmina_log.c')
-rw-r--r--src/remmina_log.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/remmina_log.c b/src/remmina_log.c
index 4dc6b659f..6da990bf3 100644
--- a/src/remmina_log.c
+++ b/src/remmina_log.c
@@ -201,15 +201,17 @@ void _remmina_debug(const gchar *fun, const gchar *fmt, ...)
va_start(args, fmt);
text = g_strdup_vprintf(fmt, args);
va_end(args);
+
g_autofree gchar *buf = g_strconcat("(", fun, ") - ", text, NULL);
- g_debug ("%s", g_strdup(buf));
+ g_debug ("%s", buf);
- buf = g_strconcat (buf, "\n", NULL);
+ /* freed in remmina_log_print_real */
+ gchar *bufn = g_strconcat(buf, "\n", NULL);
if (!log_window)
return;
- IDLE_ADD(remmina_log_print_real, g_strdup(buf));
+ IDLE_ADD(remmina_log_print_real, bufn);
}
void remmina_log_printf(const gchar *fmt, ...)