diff options
author | Alexander Larsson <alexl@redhat.com> | 2020-03-27 14:44:00 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2020-03-27 14:44:00 +0100 |
commit | 4ef12c5bc96bac541c0e8809d55d192c598da849 (patch) | |
tree | fa843ec5eba65e74a1ed6632e3746e36b1a81a5d /system-helper | |
parent | a529c149cadd852fb35b829f78700d4c1a2d2104 (diff) | |
download | flatpak-4ef12c5bc96bac541c0e8809d55d192c598da849.tar.gz |
FlatpakProgress: No need to allocate FlatpakMainContext
We store it on the stack instead and free with
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC.
Diffstat (limited to 'system-helper')
-rw-r--r-- | system-helper/flatpak-system-helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system-helper/flatpak-system-helper.c b/system-helper/flatpak-system-helper.c index 6d3ade26..f2dc6687 100644 --- a/system-helper/flatpak-system-helper.c +++ b/system-helper/flatpak-system-helper.c @@ -794,11 +794,11 @@ handle_deploy_appstream (FlatpakSystemHelper *object, if (is_oci) { - g_autoptr(FlatpakMainContext) context = NULL; + g_auto(FlatpakMainContext) context = FLATKPAK_MAIN_CONTEXT_INIT; /* This does soup http requests spinning the current mainloop, so we need one for this thread. */ - context = flatpak_progress_push_main_context (NULL); + flatpak_progress_init_main_context (NULL, &context); /* In the OCI case, we just do the full update, including network i/o, in the * system helper, see comment in flatpak_dir_update_appstream() */ |