mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
module-jack-tunnel: Properly propagate error from dlopen()
dlopen() does not set errno on failure, rather you're supposed to call dlerror() to get the latest error. dlerror() return a string so instead return -ENOENT from weakjack_load_by_path(). Depending on errno weakjack_load() could think it successfully loaded the library, and later module-jack-tunnel would crash because it call a NULL function pointer.
This commit is contained in:
parent
b19c3501e7
commit
4902646e73
1 changed files with 1 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ static inline int weakjack_load_by_path(struct weakjack *jack, const char *path)
|
||||||
|
|
||||||
hnd = dlopen(path, RTLD_NOW);
|
hnd = dlopen(path, RTLD_NOW);
|
||||||
if (hnd == NULL)
|
if (hnd == NULL)
|
||||||
return -errno;
|
return -ENOENT;
|
||||||
|
|
||||||
pw_log_info("opened libjack: %s", path);
|
pw_log_info("opened libjack: %s", path);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue