Add back path free calls on linux only

This commit is contained in:
Mike Oliphant
2023-04-08 10:54:35 -07:00
parent 9502312821
commit 51f49b5fc1
2 changed files with 12 additions and 5 deletions
+3 -3
View File
@@ -96,9 +96,9 @@ inline void disable_denormals() noexcept {
#endif #endif
#elif defined(ARCH_ARM) #elif defined(ARCH_ARM)
#if defined __has_builtin #if defined __has_builtin
#if __has_builtin(__builtin_arm_set_fpscr) && __has_builtin(__builtin_arm_get_fpscr) #if __has_builtin(__builtin_arm_set_fpscr) && __has_builtin(__builtin_arm_get_fpscr)
__builtin_arm_set_fpscr(__builtin_arm_get_fpscr() | (1 << 24)); __builtin_arm_set_fpscr(__builtin_arm_get_fpscr() | (1 << 24));
#endif #endif
#endif #endif
#endif #endif
+7
View File
@@ -215,6 +215,9 @@ namespace NAM {
store(handle, nam->uris.model_Path, apath, strlen(apath) + 1, nam->uris.atom_Path, store(handle, nam->uris.model_Path, apath, strlen(apath) + 1, nam->uris.atom_Path,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE); LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
#ifndef _WIN32 // https://github.com/drobilla/lilv/issues/14
free(apath);
#endif
return LV2_STATE_SUCCESS; return LV2_STATE_SUCCESS;
} }
@@ -251,6 +254,10 @@ namespace NAM {
memcpy(msg.path, path, size); memcpy(msg.path, path, size);
nam->schedule->schedule_work(nam->schedule->handle, sizeof(msg), &msg); nam->schedule->schedule_work(nam->schedule->handle, sizeof(msg), &msg);
#ifndef _WIN32 // https://github.com/drobilla/lilv/issues/14
free(path);
#endif
return LV2_STATE_SUCCESS; return LV2_STATE_SUCCESS;
} }