From 6a9bd051c439ef66cf00795b3829ca3ceece0497 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 3 Jan 2021 10:58:38 -0800 Subject: fixes #1401 valgrind reports leaks in all tests This arranges for nng_fini to be called via atexit in the test version of the library. It also cleans up some of the actual tests to reduce extraneous (and in some cases incorrect) calls to nng_fini. --- tests/httpclient.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/httpclient.c') diff --git a/tests/httpclient.c b/tests/httpclient.c index 29239ddb..e153a987 100644 --- a/tests/httpclient.c +++ b/tests/httpclient.c @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. +// Copyright 2021 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -35,8 +35,6 @@ const uint8_t chunked_sum[20] = { 0x9b, 0x06, 0xfb, 0xee, 0x51, 0xc6, 0x42, 0x68 }; TestMain("HTTP Client", { - atexit(nng_fini); - Convey("Given a TCP connection to example.com", { nng_aio * aio; nng_http_client *cli; -- cgit v1.2.3-70-g09d2