From 4975f943c743eadba745d1c84c1aa2bda67c64f8 Mon Sep 17 00:00:00 2001 From: Vladimir Sadovnikov Date: Thu, 28 Sep 2023 20:06:12 +0300 Subject: [PATCH] Fixed double free of generated port metadata --- CHANGELOG | 1 + include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h | 10 +++++++--- .../lsp-plug.in/plug-fw/wrap/jack/impl/ui_wrapper.h | 5 +++-- include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h | 5 +++-- include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h | 4 ++-- include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h | 4 ++-- include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h | 10 ++++++---- include/lsp-plug.in/plug-fw/wrap/vst2/impl/wrapper.h | 6 ++++-- 8 files changed, 28 insertions(+), 17 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a315d397..d71f975f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ === 1.0.18 === * Fixed parameter ranges for CLAP plugin wrapper. +* Fixed double free of generated port metadata. * Added LUFS units to metadata. * Added support of 'zero' property by the Axis controller. diff --git a/include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h b/include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h index 9928ae34..a5c55302 100644 --- a/include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2022 Linux Studio Plugins Project - * (C) 2022 Vladimir Sadovnikov + * Copyright (C) 2023 Linux Studio Plugins Project + * (C) 2023 Vladimir Sadovnikov * * This file is part of lsp-plugin-fw * Created on: 24 дек. 2022 г. @@ -110,7 +110,11 @@ namespace lsp // Cleanup generated metadata for (size_t i=0, n=vGenMetadata.size(); i - * (C) 2022 Vladimir Sadovnikov + * Copyright (C) 2023 Linux Studio Plugins Project + * (C) 2023 Vladimir Sadovnikov * * This file is part of lsp-plugin-fw * Created on: 31 янв. 2022 г. @@ -151,6 +151,7 @@ namespace lsp lsp_trace("destroy generated UI port metadata %p", port); meta::drop_port_metadata(port); } + vGenMetadata.flush(); // Destroy the display if (pDisplay != NULL) diff --git a/include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h b/include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h index be97b9e3..96a23760 100644 --- a/include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2022 Linux Studio Plugins Project - * (C) 2022 Vladimir Sadovnikov + * Copyright (C) 2023 Linux Studio Plugins Project + * (C) 2023 Vladimir Sadovnikov * * This file is part of lsp-plugin-fw * Created on: 31 янв. 2022 г. @@ -466,6 +466,7 @@ namespace lsp // lsp_trace("destroy generated port metadata %p", port); meta::drop_port_metadata(port); } + vGenMetadata.flush(); // Clear all other port containers vDataPorts.flush(); diff --git a/include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h b/include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h index 78d3dfdc..7c0b49d3 100644 --- a/include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2021 Linux Studio Plugins Project - * (C) 2021 Vladimir Sadovnikov + * Copyright (C) 2023 Linux Studio Plugins Project + * (C) 2023 Vladimir Sadovnikov * * This file is part of lsp-plugin-fw * Created on: 26 янв. 2022 г. diff --git a/include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h b/include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h index 97236bc7..e15bf40e 100644 --- a/include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2021 Linux Studio Plugins Project - * (C) 2021 Vladimir Sadovnikov + * Copyright (C) 2023 Linux Studio Plugins Project + * (C) 2023 Vladimir Sadovnikov * * This file is part of lsp-plugin-fw * Created on: 1 нояб. 2021 г. diff --git a/include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h b/include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h index 98973f1d..2b377ab5 100644 --- a/include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2021 Linux Studio Plugins Project - * (C) 2021 Vladimir Sadovnikov + * Copyright (C) 2023 Linux Studio Plugins Project + * (C) 2023 Vladimir Sadovnikov * * This file is part of lsp-plugin-fw * Created on: 24 нояб. 2021 г. @@ -155,9 +155,11 @@ namespace lsp // Cleanup generated metadata for (size_t i=0; i