From 152a95f2151985a19408cd46dcfff3457b19773d Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Fri, 18 Aug 2023 19:07:39 +0200 Subject: [PATCH] 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. --- video/out/vo_gpu_next.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;