modules: plug leak in color-selector-cmyk
Don't leak the RGB profile if the CMYK profile can't be loaded
This commit is contained in:
@ -375,8 +375,8 @@ colorsel_cmyk_config_changed (ColorselCmyk *module)
|
|||||||
GimpColorSelector *selector = GIMP_COLOR_SELECTOR (module);
|
GimpColorSelector *selector = GIMP_COLOR_SELECTOR (module);
|
||||||
GimpColorConfig *config = module->config;
|
GimpColorConfig *config = module->config;
|
||||||
cmsUInt32Number flags = 0;
|
cmsUInt32Number flags = 0;
|
||||||
cmsHPROFILE rgb_profile;
|
cmsHPROFILE rgb_profile = NULL;
|
||||||
cmsHPROFILE cmyk_profile;
|
cmsHPROFILE cmyk_profile = NULL;
|
||||||
gchar *label;
|
gchar *label;
|
||||||
gchar *summary;
|
gchar *summary;
|
||||||
gchar *text;
|
gchar *text;
|
||||||
@ -431,10 +431,14 @@ colorsel_cmyk_config_changed (ColorselCmyk *module)
|
|||||||
config->display_intent,
|
config->display_intent,
|
||||||
flags);
|
flags);
|
||||||
|
|
||||||
|
out:
|
||||||
|
|
||||||
|
if (rgb_profile)
|
||||||
cmsCloseProfile (rgb_profile);
|
cmsCloseProfile (rgb_profile);
|
||||||
|
|
||||||
|
if (cmyk_profile)
|
||||||
cmsCloseProfile (cmyk_profile);
|
cmsCloseProfile (cmyk_profile);
|
||||||
|
|
||||||
out:
|
|
||||||
if (! module->in_destruction)
|
if (! module->in_destruction)
|
||||||
colorsel_cmyk_set_color (selector, &selector->rgb, &selector->hsv);
|
colorsel_cmyk_set_color (selector, &selector->rgb, &selector->hsv);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user