mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-29 12:41:03 +00:00
Fix #1514 - explicitely initialize io in mg_iobuf_init()
This commit is contained in:
1 parent
e5d1b213c9
commit
85281ae128
2 files changed
+4
No files matched your search
@@ -1998,6 +1998,8 @@ int mg_iobuf_resize(struct mg_iobuf *io, size_t new_size) {
|
||||
}
|
||||
|
||||
int mg_iobuf_init(struct mg_iobuf *io, size_t size) {
|
||||
io->buf = NULL;
|
||||
io->size = io->len = 0;
|
||||
return mg_iobuf_resize(io, size);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ int mg_iobuf_resize(struct mg_iobuf *io, size_t new_size) {
|
||||
}
|
||||
|
||||
int mg_iobuf_init(struct mg_iobuf *io, size_t size) {
|
||||
io->buf = NULL;
|
||||
io->size = io->len = 0;
|
||||
return mg_iobuf_resize(io, size);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user