summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/dl/handle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index f5e7a33f7e..522d1a1dc6 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -64,8 +64,8 @@ rb_dlhandle_close(VALUE self)
TypedData_Get_Struct(self, struct dl_handle, &dlhandle_data_type, dlhandle);
if(dlhandle->open) {
- dlhandle->open = 0;
int ret = dlclose(dlhandle->ptr);
+ dlhandle->open = 0;
/* Check dlclose for successful return value */
if(ret) {