summaryrefslogtreecommitdiff
path: root/gio/gdocumentportal.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-03-27 16:06:54 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-03-28 11:49:59 +0100
commit07731ff3fc6ede1155a690d71b8ae2caedf680ba (patch)
treefcde094a2cc0a20c95f8f49a773547cd64ddbc02 /gio/gdocumentportal.c
parent1180649a08486f84c59c98882d735b458aba8e2d (diff)
Do not use g_autofree
The g_auto macros are available only with GCC-compatible compilers on Unix, but having __attribute__((cleanup)) is not part of our toolchain requirements, so we shouldn't use it — even if we are building on Unix-compatible systems. https://bugzilla.gnome.org/show_bug.cgi?id=794732
Diffstat (limited to 'gio/gdocumentportal.c')
-rw-r--r--gio/gdocumentportal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gio/gdocumentportal.c b/gio/gdocumentportal.c
index 3e85bd22c..56378b1e6 100644
--- a/gio/gdocumentportal.c
+++ b/gio/gdocumentportal.c
@@ -203,7 +203,7 @@ g_document_portal_add_documents (GList *uris,
{
const char *uri = l->data;
int idx = -1;
- g_autofree char *path = NULL;
+ char *path = NULL;
path = g_filename_from_uri (uri, NULL, NULL);
if (path != NULL)
@@ -221,6 +221,8 @@ g_document_portal_add_documents (GList *uris,
}
}
+ g_free (path);
+
if (idx != -1)
g_variant_builder_add (&builder, "h", idx);
else