mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08: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);
|
||||
#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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user