From 540607093e1a3a8289e3a33cef54a4df08aa1207 Mon Sep 17 00:00:00 2001 From: Michael Graeb Date: Fri, 13 Sep 2019 10:29:59 -0700 Subject: [PATCH] input-stream destroy --- tests/test_h1_client.c | 12 ++++++------ tests/test_h1_server.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_h1_client.c b/tests/test_h1_client.c index 50a4fa571..8098addfc 100644 --- a/tests/test_h1_client.c +++ b/tests/test_h1_client.c @@ -1067,8 +1067,8 @@ int s_slow_stream_get_length(struct aws_input_stream *stream, int64_t *out_lengt *out_length = sender->cursor.len; return AWS_OP_SUCCESS; } -void s_slow_stream_clean_up(struct aws_input_stream *stream) { - (void)stream; +void s_slow_stream_destroy(struct aws_input_stream *stream) { + aws_mem_release(stream->allocator, stream); } static struct aws_input_stream_vtable s_slow_stream_vtable = { @@ -1076,7 +1076,7 @@ static struct aws_input_stream_vtable s_slow_stream_vtable = { .read = s_slow_stream_read, .get_status = s_slow_stream_get_status, .get_length = s_slow_stream_get_length, - .clean_up = s_slow_stream_clean_up, + .destroy = s_slow_stream_destroy, }; /* It should be fine to receive a response before the request has finished sending */ @@ -1475,8 +1475,8 @@ static int s_error_from_outgoing_body_get_status(struct aws_input_stream *body, return AWS_OP_SUCCESS; } -static void s_error_from_outgoing_body_clean_up(struct aws_input_stream *stream) { - (void)stream; +static void s_error_from_outgoing_body_destroy(struct aws_input_stream *stream) { + aws_mem_release(stream->allocator, stream); } static struct aws_input_stream_vtable s_error_from_outgoing_body_vtable = { @@ -1484,7 +1484,7 @@ static struct aws_input_stream_vtable s_error_from_outgoing_body_vtable = { .read = s_error_from_outgoing_body_read, .get_status = s_error_from_outgoing_body_get_status, .get_length = NULL, - .clean_up = s_error_from_outgoing_body_clean_up, + .destroy = s_error_from_outgoing_body_destroy, }; static int s_error_from_incoming_headers( diff --git a/tests/test_h1_server.c b/tests/test_h1_server.c index bf22e6c09..2565961fe 100644 --- a/tests/test_h1_server.c +++ b/tests/test_h1_server.c @@ -1186,8 +1186,8 @@ static int s_error_from_outgoing_body_get_status(struct aws_input_stream *body, return AWS_OP_SUCCESS; } -static void s_error_from_outgoing_body_clean_up(struct aws_input_stream *stream) { - (void)stream; +static void s_error_from_outgoing_body_destroy(struct aws_input_stream *stream) { + aws_mem_release(stream->allocator, stream); } static struct aws_input_stream_vtable s_error_from_outgoing_body_vtable = { @@ -1195,7 +1195,7 @@ static struct aws_input_stream_vtable s_error_from_outgoing_body_vtable = { .read = s_error_from_outgoing_body_read, .get_status = s_error_from_outgoing_body_get_status, .get_length = NULL, - .clean_up = s_error_from_outgoing_body_clean_up, + .destroy = s_error_from_outgoing_body_destroy, }; static int s_error_from_incoming_headers(