diff options
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index ce2a7a553d..b8fd2cd0f4 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -203,6 +203,7 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode STREAMS_DC php_stream *stream; self = emalloc_rel_orig(sizeof(*self)); + memset(self, 0, sizeof(*self)); self->file = NULL; self->is_pipe = 0; self->lock_flag = LOCK_UN; @@ -246,6 +247,7 @@ PHPAPI php_stream *_php_stream_fopen_from_file(FILE *file, const char *mode STRE php_stream *stream; self = emalloc_rel_orig(sizeof(*self)); + memset(self, 0, sizeof(*self)); self->file = file; self->is_pipe = 0; self->lock_flag = LOCK_UN; @@ -289,6 +291,7 @@ PHPAPI php_stream *_php_stream_fopen_from_pipe(FILE *file, const char *mode STRE php_stream *stream; self = emalloc_rel_orig(sizeof(*self)); + memset(self, 0, sizeof(*self)); self->file = file; self->is_pipe = 1; self->lock_flag = LOCK_UN; |