From: Richard Maciel <[email protected]>

Related to coverity CID 10302

A global variable sd (which shouldn't exist, thus was removed) was
used as a consequence of a programming typo. The right variable to
be used is sd6.

Signed-off-by: Richard Maciel <[email protected]>
---
 src/tcsd/svrside.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/tcsd/svrside.c b/src/tcsd/svrside.c
index 807d1ea..bf4d629 100644
--- a/src/tcsd/svrside.c
+++ b/src/tcsd/svrside.c
@@ -44,7 +44,6 @@ struct tcsd_config tcsd_options;
 struct tpm_properties tpm_metrics;
 static volatile int hup = 0, term = 0;
 extern char *optarg;
-int sd;
 char *tcsd_config_file = NULL;
 
 struct srv_sock_info {
@@ -72,7 +71,6 @@ static void
 tcsd_signal_term(int signal)
 {
        term = 1;
-       close(sd);
 }
 
 void
@@ -324,7 +322,7 @@ int setup_ipv6_socket(struct srv_sock_info *ssi)
        return 0;
 
  err:
-       if (sd != -1)
+       if (sd6 != -1)
                close(sd6);
 
        return -1;
-- 
1.8.5.3


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech

Reply via email to