Fix #1514 - explicitely initialize io in mg_iobuf_init()

This commit is contained in:
Sergey Lyubka committed 2022-04-12 09:54:05 +01:00
1 parent e5d1b213c9
commit 85281ae128
2 files changed
+4

No files matched your search

+2
View File
@@ -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);
}
+2
View File
@@ -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);
}