mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-05 06:46:28 -04:00
jack: dlclose on errors
This commit is contained in:
parent
4cf5acf18d
commit
ed33b4d877
1 changed files with 4 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ static inline int weakjack_load_by_path(struct weakjack *jack, const char *path)
|
|||
|
||||
#define LOAD_SYM(name) ({ \
|
||||
if ((jack->name = dlsym(hnd, "jack_"#name )) == NULL) \
|
||||
return -ENOSYS; \
|
||||
goto error; \
|
||||
})
|
||||
spa_zero(*jack);
|
||||
LOAD_SYM(cycle_wait);
|
||||
|
|
@ -153,6 +153,9 @@ static inline int weakjack_load_by_path(struct weakjack *jack, const char *path)
|
|||
#undef LOAD_SYM
|
||||
|
||||
return 0;
|
||||
error:
|
||||
dlclose(hnd);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int weakjack_load(struct weakjack *jack, const char *lib)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue