diff options
author | Craig Tiller <ctiller@google.com> | 2015-11-10 09:30:39 +0000 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-11-10 09:30:39 +0000 |
commit | 895f14d38176bca1a4146e9d0fb6d80f40647545 (patch) | |
tree | b00c5a16f7d6e6adbe63d2b7e865c8a539d1177b /src/core/transport/chttp2 | |
parent | 308bbb2c4b7ea8ff04d0c87bd04456e5e28b6134 (diff) |
Fix memory leak
Diffstat (limited to 'src/core/transport/chttp2')
-rw-r--r-- | src/core/transport/chttp2/hpack_parser.c | 1 | ||||
-rw-r--r-- | src/core/transport/chttp2/hpack_table.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index 6d3c340a8a..0f90f08b9c 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -627,7 +627,6 @@ static const gpr_uint8 inverse_base64[256] = { static int on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md, int add_to_table) { if (add_to_table) { - GRPC_MDELEM_REF(md); if (!grpc_chttp2_hptbl_add(&p->table, md)) { return 0; } diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index e47793f230..e7cec99be1 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -316,7 +316,7 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { } /* copy the finalized entry in */ - tbl->ents[tbl->last_ent] = md; + tbl->ents[tbl->last_ent] = GRPC_MDELEM_REF(md); /* update accounting values */ tbl->last_ent = |