diff options
author | Andreas Schneider <asn@samba.org> | 2020-03-23 09:13:20 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2020-03-23 09:13:20 +0100 |
commit | 43578b9a28184086cbdef4a257db808e2992b162 (patch) | |
tree | 348f2c5ef89cfdd17b24824fe441279031fb3589 /tests | |
parent | 7bced01e89a16e673794e83dc984967aaddb558c (diff) | |
download | socket_wrapper-43578b9a28184086cbdef4a257db808e2992b162.tar.gz socket_wrapper-43578b9a28184086cbdef4a257db808e2992b162.tar.xz socket_wrapper-43578b9a28184086cbdef4a257db808e2992b162.zip |
tests: Fix a coverty warning in echo_srv
CID #288875
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/echo_srv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/echo_srv.c b/tests/echo_srv.c index 01e3325..93778f2 100644 --- a/tests/echo_srv.c +++ b/tests/echo_srv.c @@ -920,7 +920,9 @@ int main(int argc, char **argv) } echo(sock, &opts); - close(sock); + if (sock >= 0) { + close(sock); + } if (opts.daemon && opts.pidfile != NULL) { unlink(opts.pidfile); |