mirror of
git://git.musl-libc.org/musl
synced 2024-12-16 19:55:38 +00:00
don't leave the lock held on dlopen failure..
This commit is contained in:
parent
97507bde47
commit
06933cc724
@ -509,7 +509,7 @@ void *dlopen(const char *file, int mode)
|
||||
}
|
||||
|
||||
p = load_library(file);
|
||||
if (!p) return 0;
|
||||
if (!p) goto end;
|
||||
|
||||
/* First load handling */
|
||||
if (!p->deps) {
|
||||
@ -531,8 +531,8 @@ void *dlopen(const char *file, int mode)
|
||||
p->global = 1;
|
||||
}
|
||||
|
||||
end:
|
||||
pthread_rwlock_unlock(&lock);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user