mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
LV2 Host: Fix leak of plugin classes when scanning plugins multiple times
This commit is contained in:
parent
eef9183fad
commit
f9b70f1d39
2 changed files with 4 additions and 1 deletions
|
|
@ -7,6 +7,8 @@ directory. The following modifications were made:
|
||||||
- Removed the include of dlfcn.h in world.c
|
- Removed the include of dlfcn.h in world.c
|
||||||
- Fixed a leak of world->opt.lv2_path when calling lilv_world_set_option
|
- Fixed a leak of world->opt.lv2_path when calling lilv_world_set_option
|
||||||
multiple times
|
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
|
Remember to update the versions in the config headers if you ever update the
|
||||||
library versions!
|
library versions!
|
||||||
|
|
|
||||||
|
|
@ -1046,7 +1046,8 @@ lilv_world_load_plugin_classes(LilvWorld* world)
|
||||||
LilvPluginClass* pclass = lilv_plugin_class_new(
|
LilvPluginClass* pclass = lilv_plugin_class_new(
|
||||||
world, parent, class_node, (const char*)sord_node_get_string(label));
|
world, parent, class_node, (const char*)sord_node_get_string(label));
|
||||||
if (pclass) {
|
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);
|
sord_node_free(world->world, label);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue