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. --- tests/message.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/message.c') diff --git a/tests/message.c b/tests/message.c index cc50f542..4dfc9921 100644 --- a/tests/message.c +++ b/tests/message.c @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. +// Copyright 2019 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -187,11 +187,12 @@ TestMain("Message Tests", { }); Convey("Message dup copies pipe", { - nng_pipe p = NNG_PIPE_INITIALIZER; + nng_pipe p = NNG_PIPE_INITIALIZER; nng_msg *m2; memset(&p, 0x22, sizeof(p)); nng_msg_set_pipe(msg, p); So(nng_msg_dup(&m2, msg) == 0); + Reset({ nng_msg_free(m2); }); p = nng_msg_get_pipe(m2); So(nng_pipe_id(p) == 0x22222222); }); -- cgit v1.2.3-70-g09d2