alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
366 stars 177 forks source link

Double snd_dlobj_unlock() #181

Closed johado closed 3 years ago

johado commented 3 years ago

In dlmisc.c:snd_dlobj_cache_get0() there is a call to snd_dlobj_unlock() in the __err: path which should not be there. All lock/unlock are done by the callers to this function.

--- a/src/dlmisc.c
+++ b/src/dlmisc.c
@@ -359,7 +359,6 @@ snd_dlobj_cache_get0(const char *lib, const char *name,
                free(c);
              __err:
                snd_dlclose(dlobj);
-               snd_dlobj_unlock();
                return NULL;
        }
        c->dlobj = dlobj;
perexg commented 3 years ago

Fixed via https://github.com/alsa-project/alsa-lib/pull/182 . Thank you.