Added error checking for socket closing.

This commit is contained in:
Kranklyboy 2018-04-15 20:43:36 +02:00
parent 5f3c84630d
commit 2ea61d8b39

View File

@ -76,7 +76,11 @@ static void parse(int argc, char *argv[])
static void cleanup(void)
{
close(sockfd);
if (close(sockfd) < 1) {
perror(pname);
return 1;
}
free(ai);
}