diff --git a/app/core/gimpdata.c b/app/core/gimpdata.c index 1165731fa7..66b6f6f307 100644 --- a/app/core/gimpdata.c +++ b/app/core/gimpdata.c @@ -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); diff --git a/app/core/gimpgradient-load.c b/app/core/gimpgradient-load.c index 254c96431a..8aead74821 100644 --- a/app/core/gimpgradient-load.c +++ b/app/core/gimpgradient-load.c @@ -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))) { diff --git a/app/core/gimppalette-load.c b/app/core/gimppalette-load.c index 7b5b80e459..6a61c9a053 100644 --- a/app/core/gimppalette-load.c +++ b/app/core/gimppalette-load.c @@ -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); diff --git a/app/core/gimpviewable.c b/app/core/gimpviewable.c index 1e76261e2a..3c6d71cf1c 100644 --- a/app/core/gimpviewable.c +++ b/app/core/gimpviewable.c @@ -531,6 +531,8 @@ gimp_viewable_deserialize_property (GimpConfig *config, } } + g_free (encoded_image); + g_value_take_object (value, icon_pixbuf); } break; diff --git a/app/plug-in/gimppluginmanager-restore.c b/app/plug-in/gimppluginmanager-restore.c index 55837ef972..ee0d68b700 100644 --- a/app/plug-in/gimppluginmanager-restore.c +++ b/app/plug-in/gimppluginmanager-restore.c @@ -675,6 +675,7 @@ gimp_plug_in_manager_add_from_rc (GimpPlugInManager *manager, g_free (basename2); g_free (basename1); + g_free (path1); return; }