diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2019-07-06 08:54:50 -0700 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2019-07-06 08:54:50 -0700 |
commit | f08938213273283b02477299868c42711681c495 (patch) | |
tree | c84844a8e2ffbe358f107dcae90b885f47b83024 /src | |
parent | 97b9f1e99b865c8bc607d781569418dbc367ab62 (diff) | |
download | gnome-font-viewer-f08938213273283b02477299868c42711681c495.tar.gz |
Use g_auto(GStrv) to free string arrays
If we mark them with g_autofree only the container will be released.
Diffstat (limited to 'src')
-rw-r--r-- | src/font-thumbnailer.c | 2 | ||||
-rw-r--r-- | src/font-view.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/font-thumbnailer.c b/src/font-thumbnailer.c index 5b80583..0235e24 100644 --- a/src/font-thumbnailer.c +++ b/src/font-thumbnailer.c @@ -160,7 +160,7 @@ main (int argc, g_autoptr(GFile) file = NULL; g_autoptr(GOptionContext) context = NULL; g_autofree gchar *contents = NULL, *help = NULL, *str = NULL, *uri = NULL; - g_autofree gchar **arguments = NULL; + g_auto(GStrv) arguments = NULL; FT_Error error; FT_Library library; FT_Face face; diff --git a/src/font-view.c b/src/font-view.c index 23ac16c..cf218c4 100644 --- a/src/font-view.c +++ b/src/font-view.c @@ -116,7 +116,7 @@ static void ensure_window (FontViewApplication *self); static void strip_whitespace (gchar **original) { - g_autofree gchar **split = NULL; + g_auto(GStrv) split = NULL; g_autoptr(GString) reassembled = NULL; const gchar *str; gint idx, n_stripped; |