1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

LV2 Host: Fix leak of plugin classes when scanning plugins multiple times

This commit is contained in:
reuk 2025-08-27 15:44:22 +01:00
parent eef9183fad
commit f9b70f1d39
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View file

@ -7,6 +7,8 @@ directory. The following modifications were made:
- Removed the include of dlfcn.h in world.c
- Fixed a leak of world->opt.lv2_path when calling lilv_world_set_option
multiple times
- Fixed a leak of plugin classes when calling lilv_world_load_plugin_classes
multiple times
Remember to update the versions in the config headers if you ever update the
library versions!

View file

@ -1046,7 +1046,8 @@ lilv_world_load_plugin_classes(LilvWorld* world)
LilvPluginClass* pclass = lilv_plugin_class_new(
world, parent, class_node, (const char*)sord_node_get_string(label));
if (pclass) {
zix_tree_insert((ZixTree*)world->plugin_classes, pclass, NULL);
if (zix_tree_insert((ZixTree*)world->plugin_classes, pclass, NULL) == ZIX_STATUS_EXISTS)
lilv_plugin_class_free(pclass);
}
sord_node_free(world->world, label);