From 369d922d2c1546a2eb2525e40895d5f1f7f79e4b Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 26 Oct 2021 23:24:52 +0100 Subject: [PATCH] flatpak-utils-http: Ensure to wake up the main context on error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All the other code paths which set `data->done` or `data->error` ensure to wake up the main context so its loop exit conditions can be checked again — this code path was missing a wakeup though. Spotted by code inspection; I haven’t hit this in the wild. Signed-off-by: Philip Withnall (cherry picked from commit 8ff02c0e5b0c2105e1b26a1a00ec264f6482ce3e) --- common/flatpak-utils-http.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/flatpak-utils-http.c b/common/flatpak-utils-http.c index 3d1440514..2ba18d5cb 100644 --- a/common/flatpak-utils-http.c +++ b/common/flatpak-utils-http.c @@ -503,7 +503,10 @@ load_uri_callback (GObject *source_object, if (!glnx_open_tmpfile_linkable_at (data->out_tmpfile_parent_dfd, ".", O_WRONLY, data->out_tmpfile, &data->error)) - return; + { + g_main_context_wakeup (data->context); + return; + } g_assert (data->out == NULL);