diff --git a/stream.c b/stream.c index 3c44a0a30d..b07af0d3db 100644 --- a/stream.c +++ b/stream.c @@ -192,6 +192,7 @@ stream_t* new_stream(int fd,int type){ stream_t *s=malloc(sizeof(stream_t)); s->fd=fd; s->type=type; + s->buf_pos=s->buf_len=0; stream_reset(s); return s; }