mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
kms/crtc: Fix gamma state leak
The gamma value pointers of the current_state are overwritten by the calls to memdup causing a small leak. while the leak itself is small, it can be triggered quite often from things like night light. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1020
This commit is contained in:
parent
51733ca499
commit
9feda1c58b
@ -203,6 +203,7 @@ meta_kms_crtc_predict_state (MetaKmsCrtc *crtc,
|
|||||||
if (gamma->crtc != crtc)
|
if (gamma->crtc != crtc)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
clear_gamma_state (crtc);
|
||||||
crtc->current_state.gamma.size = gamma->size;
|
crtc->current_state.gamma.size = gamma->size;
|
||||||
crtc->current_state.gamma.red =
|
crtc->current_state.gamma.red =
|
||||||
g_memdup (gamma->red, gamma->size * sizeof (uint16_t));
|
g_memdup (gamma->red, gamma->size * sizeof (uint16_t));
|
||||||
|
Loading…
Reference in New Issue
Block a user