aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-05-01 10:52:35 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-05-01 10:52:35 -0700
commit5fe7e5d81cd5a4f24791239cba54c331dd0096b0 (patch)
tree2b776fa22cf7f63005949a185bd18fe04cc364a5 /test/core/end2end
parent3d50b30232d68793e42723629d693c1232e3cbf3 (diff)
Fix some memory leaks
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/no_server_test.c4
-rw-r--r--test/core/end2end/tests/invoke_large_request.c2
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.c9
-rw-r--r--test/core/end2end/tests/ping_pong_streaming.c6
4 files changed, 21 insertions, 0 deletions
diff --git a/test/core/end2end/no_server_test.c b/test/core/end2end/no_server_test.c
index f080feff38..b292620fe9 100644
--- a/test/core/end2end/no_server_test.c
+++ b/test/core/end2end/no_server_test.c
@@ -32,6 +32,7 @@
*/
#include <grpc/grpc.h>
+#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "test/core/end2end/cq_verifier.h"
#include "test/core/util/test_config.h"
@@ -94,6 +95,9 @@ int main(int argc, char **argv) {
grpc_channel_destroy(chan);
cq_verifier_destroy(cqv);
+ gpr_free(details);
+ grpc_metadata_array_destroy(&trailing_metadata_recv);
+
grpc_shutdown();
return 0;
diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c
index 5932c57260..d9d9e934cb 100644
--- a/test/core/end2end/tests/invoke_large_request.c
+++ b/test/core/end2end/tests/invoke_large_request.c
@@ -220,6 +220,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config) {
grpc_byte_buffer_destroy(response_payload);
grpc_byte_buffer_destroy(request_payload_recv);
grpc_byte_buffer_destroy(response_payload_recv);
+ gpr_slice_unref(request_payload_slice);
+ gpr_slice_unref(response_payload_slice);
end_test(&f);
config.tear_down_data(&f);
diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c
index 7fe36a8cfa..6e95a6c5f8 100644
--- a/test/core/end2end/tests/max_concurrent_streams.c
+++ b/test/core/end2end/tests/max_concurrent_streams.c
@@ -378,6 +378,15 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
grpc_call_destroy(c2);
grpc_call_destroy(s2);
+ gpr_free(details1);
+ gpr_free(details2);
+ grpc_metadata_array_destroy(&initial_metadata_recv1);
+ grpc_metadata_array_destroy(&trailing_metadata_recv1);
+ grpc_metadata_array_destroy(&initial_metadata_recv2);
+ grpc_metadata_array_destroy(&trailing_metadata_recv2);
+ grpc_metadata_array_destroy(&request_metadata_recv);
+ grpc_call_details_destroy(&call_details);
+
end_test(&f);
config.tear_down_data(&f);
}
diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c
index a40e9ec168..fe02f25875 100644
--- a/test/core/end2end/tests/ping_pong_streaming.c
+++ b/test/core/end2end/tests/ping_pong_streaming.c
@@ -239,6 +239,12 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
cq_verifier_destroy(v_client);
cq_verifier_destroy(v_server);
+ grpc_metadata_array_destroy(&initial_metadata_recv);
+ grpc_metadata_array_destroy(&trailing_metadata_recv);
+ grpc_metadata_array_destroy(&request_metadata_recv);
+ grpc_call_details_destroy(&call_details);
+ gpr_free(details);
+
end_test(&f);
config.tear_down_data(&f);
}