From 1a9b1a0ad3e1e98a307c8a99211ebc3a94b4ac3e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 29 Dec 2019 10:12:23 -0800 Subject: fixes #1065 resolver leaks work structures This includes changes to support setting the sanitizer *correctly* (the old code CMake stuff didn't quite get it right), and addresses a number of failures in the test code found by the address sanitizer. --- src/protocol/reqrep0/reqrep_test.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/protocol/reqrep0/reqrep_test.c') diff --git a/src/protocol/reqrep0/reqrep_test.c b/src/protocol/reqrep0/reqrep_test.c index 09ba9ba3..b68c08cb 100644 --- a/src/protocol/reqrep0/reqrep_test.c +++ b/src/protocol/reqrep0/reqrep_test.c @@ -35,8 +35,10 @@ test_req_rep_identity(void) TEST_CHECK(p == NNI_PROTO(3u, 1u)); // 49 TEST_CHECK(nng_getopt_string(s, NNG_OPT_PROTONAME, &n) == 0); TEST_CHECK(strcmp(n, "req") == 0); + nng_strfree(n); TEST_CHECK(nng_getopt_string(s, NNG_OPT_PEERNAME, &n) == 0); TEST_CHECK(strcmp(n, "rep") == 0); + nng_strfree(n); TEST_CHECK(nng_close(s) == 0); TEST_CHECK(nng_rep0_open(&s) == 0); @@ -46,8 +48,10 @@ test_req_rep_identity(void) TEST_CHECK(p == NNI_PROTO(3u, 0u)); // 48 TEST_CHECK(nng_getopt_string(s, NNG_OPT_PROTONAME, &n) == 0); TEST_CHECK(strcmp(n, "rep") == 0); + nng_strfree(n); TEST_CHECK(nng_getopt_string(s, NNG_OPT_PEERNAME, &n) == 0); TEST_CHECK(strcmp(n, "req") == 0); + nng_strfree(n); TEST_CHECK(nng_close(s) == 0); } -- cgit v1.2.3-70-g09d2