summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-13 03:26:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-13 03:26:18 +0000
commitb1bf026f4893a384031654c6801b3b5cdabdcd81 (patch)
tree019d2c9318b0c38184c751d0582522e3e00c5a28 /include
parent06fa07662b5bde275850db01f4302a669b87bb2e (diff)
* include/ruby/io.h (MakeOpenFile): finalize fptr get rid of
memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;\