diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-20 06:50:54 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-20 06:50:54 +0000 |
commit | 13f62a384b48a5e8ade2319e102a6aa31a0321c9 (patch) | |
tree | 8d5a7fd5a54b12cb0fb582f01579719a7294a770 /ext/dl | |
parent | 7e0907ceddbd939ea3d04c9630ad509ade7a4d60 (diff) | |
download | ruby-13f62a384b48a5e8ade2319e102a6aa31a0321c9.tar.gz |
* ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
before calling dlsym(). [ruby-dev:44091] [Bug #5021]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl')
-rw-r--r-- | ext/dl/handle.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c index ce04acbe21..eea8697e06 100644 --- a/ext/dl/handle.c +++ b/ext/dl/handle.c @@ -305,6 +305,9 @@ dlhandle_sym(void *handle, const char *name) void (*func)(); rb_secure(2); +#ifdef HAVE_DLERROR + dlerror(); +#endif func = (void (*)())(VALUE)dlsym(handle, name); CHECK_DLERROR; #if defined(FUNC_STDCALL) |