mirror of
https://github.com/brl/mutter.git
synced 2025-02-15 12:54:10 +00:00
cogl: Unconditionally free pipeline shader/program state cache struct
destroy_shader_state()/destroy_program_state() are called when the qdata pointer to the state cache structure gets overwritten, but were only conditionally destroying it. This lead to leaks when called with a shader/program state ref count > 1. Fixes: 9b9e12edb ("cogl: Port Node/Pipeline/PipelineLayer away from CoglObject") Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3141 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3366>
This commit is contained in:
parent
145cac3a37
commit
61de313198
@ -164,8 +164,9 @@ destroy_shader_state (void *user_data)
|
||||
g_free (shader_state->unit_state);
|
||||
|
||||
g_free (shader_state);
|
||||
g_free (cache);
|
||||
}
|
||||
|
||||
g_free (cache);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -298,8 +298,9 @@ destroy_program_state (void *user_data)
|
||||
g_array_free (program_state->uniform_locations, TRUE);
|
||||
|
||||
g_free (program_state);
|
||||
g_free (cache);
|
||||
}
|
||||
|
||||
g_free (cache);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -121,8 +121,9 @@ destroy_shader_state (void *user_data)
|
||||
GE( ctx, glDeleteShader (shader_state->gl_shader) );
|
||||
|
||||
g_free (shader_state);
|
||||
g_free (cache);
|
||||
}
|
||||
|
||||
g_free (cache);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user