mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 12:41:50 +01:00
gio-tool-save: Prevent overwriting error
The following warning is shown, when both g_output_stream_write and g_output_stream_close fail: "GError set over the top of a previous GError or uninitialized memory." Let's clear the error after use. https://bugzilla.gnome.org/show_bug.cgi?id=786463
This commit is contained in:
parent
37cddec0ee
commit
c7f2a7e431
@ -110,7 +110,7 @@ save (GFile *file)
|
|||||||
{
|
{
|
||||||
save_res = FALSE;
|
save_res = FALSE;
|
||||||
print_error ("%s", error->message);
|
print_error ("%s", error->message);
|
||||||
g_error_free (error);
|
g_clear_error (error);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
res -= written;
|
res -= written;
|
||||||
|
Loading…
Reference in New Issue
Block a user