libgimpcolor: don't leak the path in gimp_color_profile_new_from_file()

This commit is contained in:
Michael Natterer 2016-05-04 18:58:37 +02:00
parent 95f7cab96c
commit 086dc60505
1 changed files with 3 additions and 2 deletions

View File

@ -184,9 +184,10 @@ gimp_color_profile_new_from_file (GFile *file,
if (path)
{
GMappedFile *mapped;
GMappedFile *mapped;
mapped = g_mapped_file_new (path, FALSE, error);
g_free (path);
if (! mapped)
return NULL;
@ -521,7 +522,7 @@ gimp_color_profile_get_copyright (GimpColorProfile *profile)
* string that can be used to label the profile in a user interface.
*
* Unlike gimp_color_profile_get_description(), this function always
* returns a string (as a fallback, it returns "(unnamed profile)".
* returns a string (as a fallback, it returns "(unnamed profile)").
*
* Return value: the @profile's label. The returned value belongs to
* @profile and must not be modified or freed.