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:
Ondrej Holy 2017-08-11 13:37:29 +02:00
parent 37cddec0ee
commit c7f2a7e431

View File

@ -110,7 +110,7 @@ save (GFile *file)
{
save_res = FALSE;
print_error ("%s", error->message);
g_error_free (error);
g_clear_error (error);
goto out;
}
res -= written;