summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ruby/io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/io.h b/include/ruby/io.h
index 2ccaf0f1f9..e05a0f52ca 100644
--- a/include/ruby/io.h
+++ b/include/ruby/io.h
@@ -101,7 +101,7 @@ typedef struct rb_io_t {
#define MakeOpenFile(obj, fp) do {\
if (RFILE(obj)->fptr) {\
rb_io_close(obj);\
- free(RFILE(obj)->fptr);\
+ rb_io_fptr_finalize(RFILE(obj)->fptr);\
RFILE(obj)->fptr = 0;\
}\
fp = 0;\