don't leave the lock held on dlopen failure..

This commit is contained in:
Rich Felker 2011-06-26 22:09:32 -04:00
parent 97507bde47
commit 06933cc724
1 changed files with 2 additions and 2 deletions

View File

@ -509,7 +509,7 @@ void *dlopen(const char *file, int mode)
} }
p = load_library(file); p = load_library(file);
if (!p) return 0; if (!p) goto end;
/* First load handling */ /* First load handling */
if (!p->deps) { if (!p->deps) {
@ -531,8 +531,8 @@ void *dlopen(const char *file, int mode)
p->global = 1; p->global = 1;
} }
end:
pthread_rwlock_unlock(&lock); pthread_rwlock_unlock(&lock);
return p; return p;
} }