Commit 05ad9152 authored by Luca Boccassi's avatar Luca Boccassi

Problem: test_term_endpoint does not clean up at exit

Solution: close socket and destroy context to reduce Valgrind noise
parent f8f80432
......@@ -156,6 +156,14 @@ int main (void)
assert (rc == 0);
#endif
// Clean up.
rc = zmq_close (pull);
assert (rc == 0);
rc = zmq_close (push);
assert (rc == 0);
rc = zmq_ctx_term (ctx);
assert (rc == 0);
// Create infrastructure (wild-card binding)
ctx = zmq_ctx_new ();
assert (ctx);
......@@ -188,5 +196,13 @@ int main (void)
assert (rc == -1 && zmq_errno () == ENOENT);
#endif
// Clean up.
rc = zmq_close (pull);
assert (rc == 0);
rc = zmq_close (push);
assert (rc == 0);
rc = zmq_ctx_term (ctx);
assert (rc == 0);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment