summaryrefslogtreecommitdiffstats
path: root/video/out/gl_lcms.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gl_lcms.c')
-rw-r--r--video/out/gl_lcms.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/gl_lcms.c b/video/out/gl_lcms.c
index 8f65459ca8..ab273ffc0b 100644
--- a/video/out/gl_lcms.c
+++ b/video/out/gl_lcms.c
@@ -152,8 +152,10 @@ void gl_lcms_set_options(struct gl_lcms *p, struct mp_icc_opts *opts)
// takes over ownership.
void gl_lcms_set_memory_profile(struct gl_lcms *p, bstr *profile)
{
- if (!p->opts.profile_auto)
+ if (!p->opts.profile_auto) {
+ talloc_free(profile->start);
return;
+ }
if (!p->icc_path && p->icc_data && profile->start &&
profile->len == p->icc_size &&