mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-23 01:18:53 +02:00
gio-tool: Various memory leak fixes
https://bugzilla.gnome.org/show_bug.cgi?id=776169
This commit is contained in:
@@ -112,8 +112,6 @@ handle_set (int argc, char *argv[], gboolean do_help)
|
||||
return 1;
|
||||
}
|
||||
|
||||
file = g_file_new_for_commandline_arg (argv[1]);
|
||||
|
||||
if (argc < 3)
|
||||
{
|
||||
show_help (context, _("Attribute not specified"));
|
||||
@@ -177,6 +175,8 @@ handle_set (int argc, char *argv[], gboolean do_help)
|
||||
return 1;
|
||||
}
|
||||
|
||||
file = g_file_new_for_commandline_arg (argv[1]);
|
||||
|
||||
if (!g_file_set_attribute (file,
|
||||
attribute,
|
||||
type,
|
||||
@@ -188,8 +188,11 @@ handle_set (int argc, char *argv[], gboolean do_help)
|
||||
{
|
||||
print_error (error->message);
|
||||
g_error_free (error);
|
||||
g_object_unref (file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
g_object_unref (file);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user