From 84f0d96ae04bc2c75b2f4bc6946ee781df5457c4 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 12 Jun 2012 01:45:50 +0200 Subject: [PATCH] unix: reset error status in uv_dlopen() Fixes a bug where uv_dlopen() mistakenly reported failure because of previous errors. --- src/unix/dl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix/dl.c b/src/unix/dl.c index 9eb660011..01796e3b8 100644 --- a/src/unix/dl.c +++ b/src/unix/dl.c @@ -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);