git.samba.org
/
resolv_wrapper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2d2aa6
)
tests: Fix coverity warning that sock could be negative
author
Andreas Schneider
<asn@samba.org>
Mon, 21 Oct 2019 06:59:57 +0000
(08:59 +0200)
committer
Andreas Schneider
<asn@samba.org>
Mon, 21 Oct 2019 07:00:53 +0000
(09:00 +0200)
CID 263708
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
tests/dns_srv.c
patch
|
blob
|
history
diff --git
a/tests/dns_srv.c
b/tests/dns_srv.c
index 94e5c3d935ec66027481e9cfbe8a8b38abc3f310..868dee4e8fb60e76fab255e09700c4b9f56f1e2e 100644
(file)
--- a/
tests/dns_srv.c
+++ b/
tests/dns_srv.c
@@
-633,8
+633,10
@@
int main(int argc, char **argv)
}
}
- dns(sock);
- close(sock);
+ if (sock != -1) {
+ dns(sock);
+ close(sock);
+ }
if (opts.daemon) {
unlink(opts.pidfile);