summaryrefslogtreecommitdiff
path: root/main/streams/plain_wrapper.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-03-01 17:27:23 +0000
committerWez Furlong <wez@php.net>2003-03-01 17:27:23 +0000
commitc3e6bcd398f09d6b25695113a4a1df27cda4b17e (patch)
treee492b26f67c23519dfe63ac98ec372e484daa402 /main/streams/plain_wrapper.c
parent3de8b87cbad97d7e0b060f4a31f9c016747604a7 (diff)
downloadphp-git-c3e6bcd398f09d6b25695113a4a1df27cda4b17e.tar.gz
Ensure that all fields are initialized to NULL.
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r--main/streams/plain_wrapper.c3
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;