colorstate: Don't leak names

The cicp colorstates allocate their names, so they should free
them too.
This commit is contained in:
Matthias Clasen 2024-08-13 20:50:50 -04:00
parent a6e0028899
commit 16ad1e428f

View File

@ -425,7 +425,7 @@ struct _GdkCicpColorState
GdkColorState *no_srgb;
const char *name;
char *name;
GdkTransferFunc eotf;
GdkTransferFunc oetf;
@ -461,6 +461,8 @@ gdk_cicp_color_state_free (GdkColorState *cs)
{
GdkCicpColorState *self = (GdkCicpColorState *) cs;
g_free (self->name);
if (self->no_srgb)
gdk_color_state_unref (self->no_srgb);