summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 4bb90f18e..29839d376 100644
--- a/io.c
+++ b/io.c
@@ -3369,6 +3369,7 @@ rb_io_reopen(argc, argv, file)
fptr = RFILE(file)->fptr;
if (!fptr) {
fptr = RFILE(file)->fptr = ALLOC(OpenFile);
+ MEMZERO(fptr, OpenFile, 1);
}
if (!NIL_P(nmode)) {
@@ -3392,7 +3393,6 @@ rb_io_reopen(argc, argv, file)
fclose(fptr->f2);
fptr->f2 = 0;
}
-
return file;
}