mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-03 01:42:18 +01:00
Merge branch 'backport-4677-4678-display-name-leaks-glib-2-84' into 'glib-2-84'
Backport !4677 and !4678 “Fix GFile leak in g_local_file_set_display_name()” to glib-2-84 See merge request GNOME/glib!4679
This commit is contained in:
@@ -1189,6 +1189,7 @@ g_local_file_set_display_name (GFile *file,
|
||||
if (errsv != ENOENT)
|
||||
{
|
||||
g_set_io_error (error, _("Error renaming file %s: %s"), new_file, errsv);
|
||||
g_object_unref (new_file);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1196,6 +1197,7 @@ g_local_file_set_display_name (GFile *file,
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_EXISTS,
|
||||
_("Can’t rename file, filename already exists"));
|
||||
g_object_unref (new_file);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user