diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-05-16 00:53:38 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-05-16 00:53:38 +0000 |
commit | b7aef0ed3c08eeae2b562123fd6ebef167a9160d (patch) | |
tree | b41f1b9934c7b9d5187eacc2c273800d52ac5836 | |
parent | 1a7e9e3b57b968e49face1dabee83391b07c44ba (diff) | |
download | FreeBSD-src-b7aef0ed3c08eeae2b562123fd6ebef167a9160d.zip FreeBSD-src-b7aef0ed3c08eeae2b562123fd6ebef167a9160d.tar.gz |
Close the connect socket as well as the listen socket on completion.
Update copyright.
-rw-r--r-- | tools/regression/sockets/listenclose/listenclose.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/regression/sockets/listenclose/listenclose.c b/tools/regression/sockets/listenclose/listenclose.c index 3053b1d..425e39f 100644 --- a/tools/regression/sockets/listenclose/listenclose.c +++ b/tools/regression/sockets/listenclose/listenclose.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004 Robert N. M. Watson + * Copyright (c) 2004-2005 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -104,7 +104,7 @@ main(int argc, char *argv[]) if (connect(connect_sock, (struct sockaddr *)&sin, sizeof(sin)) < 0) errx(-1, "connect() for connect socket: %s", strerror(errno)); - + close(connect_sock); close(listen_sock); return (0); |