summaryrefslogtreecommitdiff
path: root/ext/dl/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/handle.c')
-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 f5e7a33f7e5..522d1a1dc63 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) {