diff options
author | Sam James <sam@gentoo.org> | 2022-11-15 17:03:37 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2022-11-15 17:55:59 +0000 |
commit | 91a3cc2e994be587def3b70762f15461101d43a1 (patch) | |
tree | 2871219c7c57b4f933319be450d19d54487396bf | |
parent | e1d70ee1218084a70acae50153f8a759c3f3b959 (diff) | |
download | colord-91a3cc2e994be587def3b70762f15461101d43a1.tar.gz |
lib: avoid destructing LCMS plugin twice with lcms 2.14
lcms 2.14 contains a change to avoid a memory leak, but that change
assumes correct API usage. It's not necessary to both cmsUnregisterPluginsTHR()
and then cmsDeleteContext() -- we can just straight up delete the LCMS
context instead (cmsDeleteContext()).
So, follow upstream's suggestion & do that. This fixes memory corruption
when building colord on x86, for example.
Bug: https://github.com/mm2/Little-CMS/issues/344
Fixes: https://github.com/hughsie/colord/issues/145
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | lib/colord/cd-context-lcms.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/colord/cd-context-lcms.c b/lib/colord/cd-context-lcms.c index f04ccd4..a4df415 100644 --- a/lib/colord/cd-context-lcms.c +++ b/lib/colord/cd-context-lcms.c @@ -163,7 +163,6 @@ cd_context_lcms_free (gpointer ctx) g_clear_error (error_ctx); g_free (error_ctx); - cmsUnregisterPluginsTHR (ctx); cmsDeleteContext (ctx); } |