mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-19 22:34:37 +00:00
app: don't leak the GFileInfo in file_open_image() and file_save()
This commit is contained in:
parent
cd505dbd02
commit
ba065a31ec
|
@ -132,6 +132,7 @@ file_open_image (Gimp *gimp,
|
|||
{
|
||||
g_set_error_literal (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
|
||||
_("Not a regular file"));
|
||||
g_object_unref (info);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -140,8 +141,11 @@ file_open_image (Gimp *gimp,
|
|||
{
|
||||
g_set_error_literal (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
|
||||
_("Premission denied"));
|
||||
g_object_unref (info);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_object_unref (info);
|
||||
}
|
||||
|
||||
if (! g_file_is_native (file) &&
|
||||
|
|
|
@ -113,6 +113,7 @@ file_save (Gimp *gimp,
|
|||
{
|
||||
g_set_error_literal (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
|
||||
_("Not a regular file"));
|
||||
g_object_unref (info);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -121,8 +122,11 @@ file_save (Gimp *gimp,
|
|||
{
|
||||
g_set_error_literal (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
|
||||
_("Permission denied"));
|
||||
g_object_unref (info);
|
||||
goto out;
|
||||
}
|
||||
|
||||
g_object_unref (info);
|
||||
}
|
||||
|
||||
if (! g_file_is_native (file) &&
|
||||
|
|
Loading…
Reference in a new issue