obs: fix double-free on exit

https://github.com/obsproject/obs-studio/issues/11029#issuecomment-2249747587
Fix: #51434
This commit is contained in:
Đoàn Trần Công Danh 2024-07-25 15:23:20 +07:00
parent 00346cb2b4
commit 78f63d7c88
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,30 @@
https://github.com/obsproject/obs-studio/issues/11029#issuecomment-2249747587
--- a/libobs/obs-nix.c
+++ b/libobs/obs-nix.c
@@ -68,26 +68,6 @@ static const struct obs_nix_hotkeys_vtab
void add_default_module_paths(void)
{
- char *module_bin_path =
- os_get_executable_path_ptr("../" OBS_PLUGIN_PATH);
- char *module_data_path = os_get_executable_path_ptr(
- "../" OBS_DATA_PATH "/obs-plugins/%module%");
-
- if (module_bin_path && module_data_path) {
- char *abs_module_bin_path =
- os_get_abs_path_ptr(module_bin_path);
-
- if (abs_module_bin_path &&
- strcmp(abs_module_bin_path, OBS_INSTALL_PREFIX
- "/" OBS_PLUGIN_DESTINATION) != 0) {
- obs_add_module_path(module_bin_path, module_data_path);
- }
- bfree(abs_module_bin_path);
- }
-
- bfree(module_bin_path);
- bfree(module_data_path);
-
for (int i = 0; i < module_patterns_size; i++) {
obs_add_module_path(module_bin[i], module_data[i]);
}

View File

@ -1,10 +1,11 @@
# Template file for 'obs'
pkgname=obs
version=30.2.1
revision=1
revision=2
archs="i686* x86_64* ppc64le* aarch64* riscv64*"
build_style=cmake
configure_args="-DOBS_VERSION_OVERRIDE=${version} -DENABLE_JACK=ON
-DCMAKE_INSTALL_DATAROOTDIR=/usr/share
-DENABLE_VST=OFF -DENABLE_AJA=OFF -DCALM_DEPRECATION=ON
-DENABLE_SCRIPTING_LUA=$(vopt_if luajit 'ON' 'OFF')
-DENABLE_NATIVE_NVENC=OFF -DENABLE_QSV11=$(vopt_if 'ON' 'OFF')"