mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-25 01:12:12 -04:00
oci-registry: Fix error reporting
The intention here seems to have been that failing to close the http stream provokes a warning but does not make the function fail, but we were setting the wrong error, resulting in a NULL dereference if closing the http stream somehow fails. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
committed by
Alexander Larsson
parent
4c676e4e3a
commit
1b930e955e
@@ -2829,7 +2829,7 @@ load_oci_index (GFile *index,
|
||||
if (json == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!g_input_stream_close (G_INPUT_STREAM (in), cancellable, error))
|
||||
if (!g_input_stream_close (G_INPUT_STREAM (in), cancellable, &local_error))
|
||||
g_warning ("Error closing http stream: %s", local_error->message);
|
||||
|
||||
return (FlatpakOciIndexResponse *) g_steal_pointer (&json);
|
||||
|
||||
Reference in New Issue
Block a user