summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-08-18 19:07:39 +0200
committerNiklas Haas <git@haasn.dev>2023-08-18 19:07:39 +0200
commit152a95f2151985a19408cd46dcfff3457b19773d (patch)
tree88b7066ae84a99a073aa7d99f14ef91929cca07a /video/out
parentf97584cadc23c4e2f20076b7d313b37211412a74 (diff)
downloadmpv-152a95f2151985a19408cd46dcfff3457b19773d.tar.bz2
mpv-152a95f2151985a19408cd46dcfff3457b19773d.tar.xz
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.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo_gpu_next.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index 171609c143..4a799319b5 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -1148,7 +1148,7 @@ static bool update_auto_profile(struct priv *p, int *events)
}
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;
pl_icc_profile_compute_signature(&p->icc_profile);
return true;