app: fix a bunch of valgrind-found leaks
This commit is contained in:
@ -788,12 +788,16 @@ gimp_data_set_file (GimpData *data,
|
||||
NULL, NULL);
|
||||
|
||||
/* and we can write it */
|
||||
if (info &&
|
||||
g_file_info_get_attribute_boolean (info,
|
||||
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE))
|
||||
if (info)
|
||||
{
|
||||
private->writable = writable ? TRUE : FALSE;
|
||||
private->deletable = deletable ? TRUE : FALSE;
|
||||
if (g_file_info_get_attribute_boolean (info,
|
||||
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE))
|
||||
{
|
||||
private->writable = writable ? TRUE : FALSE;
|
||||
private->deletable = deletable ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
g_object_unref (info);
|
||||
}
|
||||
}
|
||||
else /* OR it doesn't exist */
|
||||
@ -806,12 +810,16 @@ gimp_data_set_file (GimpData *data,
|
||||
NULL, NULL);
|
||||
|
||||
/* and we can write to its parent directory */
|
||||
if (info &&
|
||||
g_file_info_get_attribute_boolean (info,
|
||||
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE))
|
||||
if (info)
|
||||
{
|
||||
private->writable = writable ? TRUE : FALSE;
|
||||
private->deletable = deletable ? TRUE : FALSE;
|
||||
if (g_file_info_get_attribute_boolean (info,
|
||||
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE))
|
||||
{
|
||||
private->writable = writable ? TRUE : FALSE;
|
||||
private->deletable = deletable ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
g_object_unref (parent);
|
||||
|
||||
@ -193,6 +193,7 @@ gimp_gradient_load (GimpContext *context,
|
||||
default:
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Corrupt segment %d."), i);
|
||||
g_free (line);
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
@ -200,9 +201,12 @@ gimp_gradient_load (GimpContext *context,
|
||||
{
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Corrupt segment %d."), i);
|
||||
g_free (line);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
g_free (line);
|
||||
|
||||
if (( prev && (prev->right < seg->left)) ||
|
||||
(! prev && (0.0 < seg->left)))
|
||||
{
|
||||
|
||||
@ -72,6 +72,8 @@ gimp_palette_load (GimpContext *context,
|
||||
goto failed;
|
||||
}
|
||||
|
||||
g_free (str);
|
||||
|
||||
palette = g_object_new (GIMP_TYPE_PALETTE,
|
||||
"mime-type", "application/x-gimp-palette",
|
||||
NULL);
|
||||
|
||||
@ -531,6 +531,8 @@ gimp_viewable_deserialize_property (GimpConfig *config,
|
||||
}
|
||||
}
|
||||
|
||||
g_free (encoded_image);
|
||||
|
||||
g_value_take_object (value, icon_pixbuf);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -675,6 +675,7 @@ gimp_plug_in_manager_add_from_rc (GimpPlugInManager *manager,
|
||||
|
||||
g_free (basename2);
|
||||
g_free (basename1);
|
||||
g_free (path1);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user