1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-30 19:52:14 +00:00

vo_gpu_next: fix leak of --icc-profile-auto on uninit

This was already correctly freed when acquiring a new profile, but never
freed on uninit. Fix by reparenting the profile onto `p`, which is what
vo_gpu also does.
This commit is contained in:
Niklas Haas 2023-08-18 19:07:39 +02:00
parent f97584cadc
commit 152a95f215

View File

@ -1148,7 +1148,7 @@ static bool update_auto_profile(struct priv *p, int *events)
} }
talloc_free((void *) p->icc_profile.data); talloc_free((void *) p->icc_profile.data);
p->icc_profile.data = icc.start; p->icc_profile.data = talloc_steal(p, icc.start);
p->icc_profile.len = icc.len; p->icc_profile.len = icc.len;
pl_icc_profile_compute_signature(&p->icc_profile); pl_icc_profile_compute_signature(&p->icc_profile);
return true; return true;