mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-19 18:03:50 +00:00
Problem: test_term_endpoint does not clean up at exit
Solution: close socket and destroy context to reduce Valgrind noise
This commit is contained in:
parent
f8f8043222
commit
05ad915265
@ -156,6 +156,14 @@ int main (void)
|
|||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
#endif
|
#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)
|
// Create infrastructure (wild-card binding)
|
||||||
ctx = zmq_ctx_new ();
|
ctx = zmq_ctx_new ();
|
||||||
assert (ctx);
|
assert (ctx);
|
||||||
@ -188,5 +196,13 @@ int main (void)
|
|||||||
assert (rc == -1 && zmq_errno () == ENOENT);
|
assert (rc == -1 && zmq_errno () == ENOENT);
|
||||||
#endif
|
#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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user