Commit 07731ff3 authored by Emmanuele Bassi's avatar Emmanuele Bassi

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
parent 1180649a
......@@ -2886,7 +2886,7 @@ g_desktop_app_info_launch_uris_with_dbus (GDesktopAppInfo *info,
GAppLaunchContext *launch_context)
{
GList *ruris = uris;
g_autofree char *app_id = NULL;
char *app_id = NULL;
g_return_val_if_fail (info != NULL, FALSE);
......@@ -2905,6 +2905,8 @@ g_desktop_app_info_launch_uris_with_dbus (GDesktopAppInfo *info,
if (ruris != uris)
g_list_free_full (ruris, g_free);
g_free (app_id);
return TRUE;
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment