diff --git a/virtualsmartcard/src/vpcd-config/local-ip.c b/virtualsmartcard/src/vpcd-config/local-ip.c index 6541490..7ecf9ee 100644 --- a/virtualsmartcard/src/vpcd-config/local-ip.c +++ b/virtualsmartcard/src/vpcd-config/local-ip.c @@ -59,7 +59,7 @@ err: #endif if (!ip) printf("%s: %s\n" , ERROR_STRING, strerror(errno)); - if (sock > 0) + if (sock >= 0) close(sock); return ip;