From 8fe72ccec9dcb286faf5b32892b0c59105c37a15 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 3 Jan 2024 11:14:37 -0500 Subject: [PATCH] MT#59069 switch GString to g_auto Change-Id: I22620e13868d31676420c93e562638bf476f1823 --- recording-daemon/output.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recording-daemon/output.c b/recording-daemon/output.c index 534e9d45b..619a46200 100644 --- a/recording-daemon/output.c +++ b/recording-daemon/output.c @@ -111,7 +111,7 @@ static output_t *output_new(const char *path, const metafile_t *mf, const char * gettimeofday(&now, NULL); localtime_r(&now.tv_sec, &tm); - GString *f = g_string_new(""); + g_autoptr(GString) f = g_string_new(""); for (const char *p = output_pattern; *p; p++) { if (*p != '%') { g_string_append_c(f, *p); @@ -186,8 +186,6 @@ done:; create_parent_dirs(ret->full_filename); ret->kind = kind; - g_string_free(f, TRUE); - return ret; }