diff options
author | Craig Tiller <ctiller@google.com> | 2015-01-30 09:45:50 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-01-31 20:21:16 -0800 |
commit | d375663636ccf722a637ab1efa7e7f7011de7f5d (patch) | |
tree | 40ee359ba502274371f3267a74293f073f673c48 /src/core | |
parent | 5a8a8073b8efbf6c18ff4a161cc8f1e4f291556c (diff) |
Fix memory leak
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/channel/http_server_filter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/channel/http_server_filter.c b/src/core/channel/http_server_filter.c index 3e5bb0506a..b70af434a7 100644 --- a/src/core/channel/http_server_filter.c +++ b/src/core/channel/http_server_filter.c @@ -328,6 +328,7 @@ static void init_channel_elem(grpc_channel_element *elem, grpc_mdelem_from_strings(mdctx, "content-type", p->content_type); slice = gpr_slice_from_copied_string(p->content); g->content = grpc_byte_buffer_create(&slice, 1); + gpr_slice_unref(slice); } } } @@ -342,6 +343,7 @@ static void destroy_channel_elem(grpc_channel_element *elem) { for (i = 0; i < channeld->gettable_count; i++) { grpc_mdelem_unref(channeld->gettables[i].path); grpc_mdelem_unref(channeld->gettables[i].content_type); + grpc_byte_buffer_destroy(channeld->gettables[i].content); } gpr_free(channeld->gettables); |