rawmidi: use snd_dlobj_cache_get2() in rawmidi open (coverity)

Use proper reference counting for the dynamic symbol.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-05-24 20:31:24 +02:00
parent 3ae743efea
commit 8ab0393b42
4 changed files with 57 additions and 32 deletions

View file

@ -328,6 +328,8 @@ static inline int snd_open_device(const char *filename, int fmode)
/* make local functions really local */
#define snd_dlobj_cache_get \
snd1_dlobj_cache_get
#define snd_dlobj_cache_get2 \
snd1_dlobj_cache_get2
#define snd_dlobj_cache_put \
snd1_dlobj_cache_put
#define snd_dlobj_cache_cleanup \
@ -341,6 +343,7 @@ static inline int snd_open_device(const char *filename, int fmode)
/* dlobj cache */
void *snd_dlobj_cache_get(const char *lib, const char *name, const char *version, int verbose);
void *snd_dlobj_cache_get2(const char *lib, const char *name, const char *version, int verbose);
int snd_dlobj_cache_put(void *open_func);
void snd_dlobj_cache_cleanup(void);