mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-08 05:40:07 +02:00
gdump: do not leak gfile objects
This commit is contained in:
parent
8a08674b33
commit
50c7ae999c
7
gdump.c
7
gdump.c
@ -480,10 +480,17 @@ g_irepository_dump (const char *arg, GError **error)
|
|||||||
g_strfreev (args);
|
g_strfreev (args);
|
||||||
|
|
||||||
input = g_file_read (input_file, NULL, error);
|
input = g_file_read (input_file, NULL, error);
|
||||||
|
g_object_unref (input_file);
|
||||||
|
|
||||||
if (input == NULL)
|
if (input == NULL)
|
||||||
|
{
|
||||||
|
g_object_unref (output_file);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
output = g_file_replace (output_file, NULL, FALSE, 0, NULL, error);
|
output = g_file_replace (output_file, NULL, FALSE, 0, NULL, error);
|
||||||
|
g_object_unref (output_file);
|
||||||
|
|
||||||
if (output == NULL)
|
if (output == NULL)
|
||||||
{
|
{
|
||||||
g_input_stream_close (G_INPUT_STREAM (input), NULL, NULL);
|
g_input_stream_close (G_INPUT_STREAM (input), NULL, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user