Skip to content

Commit

Permalink
Merge pull request #245 from ngtcp2/port-ngtcp2-changes
Browse files Browse the repository at this point in the history
Port ngtcp2 changes
  • Loading branch information
tatsuhiro-t authored Aug 13, 2024
2 parents 28b9a79 + 75e005d commit 7791fe5
Show file tree
Hide file tree
Showing 10 changed files with 302 additions and 253 deletions.
4 changes: 2 additions & 2 deletions lib/nghttp3_balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ int nghttp3_balloc_get(nghttp3_balloc *balloc, void **pbuf, size_t n) {
assert(n <= balloc->blklen);

if (nghttp3_buf_left(&balloc->buf) < n) {
p = nghttp3_mem_malloc(balloc->mem, sizeof(nghttp3_memblock_hd) + 0x10u +
balloc->blklen);
p = nghttp3_mem_malloc(balloc->mem,
sizeof(nghttp3_memblock_hd) + 0x8u + balloc->blklen);
if (p == NULL) {
return NGHTTP3_ERR_NOMEM;
}
Expand Down
5 changes: 4 additions & 1 deletion lib/nghttp3_balloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ typedef struct nghttp3_memblock_hd nghttp3_memblock_hd;
* nghttp3_memblock_hd is the header of memory block.
*/
struct nghttp3_memblock_hd {
nghttp3_memblock_hd *next;
union {
nghttp3_memblock_hd *next;
uint64_t pad;
};
};

/*
Expand Down
2 changes: 1 addition & 1 deletion lib/nghttp3_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ void nghttp3_conn_del(nghttp3_conn *conn) {
nghttp3_qpack_encoder_free(&conn->qenc);
nghttp3_qpack_decoder_free(&conn->qdec);

nghttp3_map_each_free(&conn->streams, free_stream, NULL);
nghttp3_map_each(&conn->streams, free_stream, NULL);
nghttp3_map_free(&conn->streams);

nghttp3_objalloc_free(&conn->stream_objalloc);
Expand Down
Loading

0 comments on commit 7791fe5

Please sign in to comment.