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 LV2 path when calling lilv_world_set_option multiple times

This commit is contained in:
reuk 2025-08-27 14:56:42 +01:00
parent 1843554ad8
commit eef9183fad
No known key found for this signature in database
2 changed files with 7 additions and 4 deletions

View file

@ -1,11 +1,13 @@
The source code for lilv and its dependent libraries have been copied into this The source code for lilv and its dependent libraries have been copied into this
directory. The following modifications were made: directory. The following modifications were made:
- Removed files not strictly required to build the lilv library, - Removed files not strictly required to build the lilv library, including
including generated config headers generated config headers
- Added handwritten config headers - Added handwritten config headers
- 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
multiple times
Remember to update the versions in the config headers if you ever update Remember to update the versions in the config headers if you ever update the
the library versions! library versions!

View file

@ -197,6 +197,7 @@ lilv_world_set_option(LilvWorld* world, const char* uri, const LilvNode* value)
} }
} else if (!strcmp(uri, LILV_OPTION_LV2_PATH)) { } else if (!strcmp(uri, LILV_OPTION_LV2_PATH)) {
if (lilv_node_is_string(value)) { if (lilv_node_is_string(value)) {
free(world->opt.lv2_path);
world->opt.lv2_path = lilv_strdup(lilv_node_as_string(value)); world->opt.lv2_path = lilv_strdup(lilv_node_as_string(value));
return; return;
} }