unix: reset error status in uv_dlopen()

Fixes a bug where uv_dlopen() mistakenly reported failure because of previous
errors.
This commit is contained in:
Ben Noordhuis 2012-06-12 01:45:50 +02:00
parent e0c6114e32
commit 84f0d96ae0

View File

@ -31,6 +31,7 @@ static int uv__dlerror(uv_lib_t* lib);
int uv_dlopen(const char* filename, uv_lib_t* lib) {
dlerror(); /* Reset error status. */
lib->errmsg = NULL;
lib->handle = dlopen(filename, RTLD_LAZY);
return uv__dlerror(lib);