1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

CID1130009: Resource leak in sp_opensocket()

Corresponding to flashrom svn r1775.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
Stefan Reinauer 2014-04-26 16:12:03 +00:00 committed by Stefan Tauner
parent a9c2342791
commit b879287c42

View File

@ -100,6 +100,7 @@ static int sp_opensocket(char *ip, unsigned int port)
if (NULL == hostPtr) {
hostPtr = gethostbyaddr(ip, strlen(ip), AF_INET);
if (NULL == hostPtr) {
close(sock);
msg_perr("Error: cannot resolve %s\n", ip);
return -1;
}