Catch error in cleanup() function.

This commit is contained in:
Kranklyboy
2018-04-15 19:40:54 +02:00
parent c6affd8c21
commit a5b88461ed
+5 -1
View File
@@ -53,7 +53,11 @@ static void cleanup(void)
free(ships[i]); free(ships[i]);
} }
close(sockfd); if (close(sockfd) < 0) {
perror(pname);
return 1;
}
free(ai); free(ai);
} }