Commit b879287c authored by Stefan Reinauer's avatar Stefan Reinauer Committed by Stefan Tauner
Browse files

CID1130009: Resource leak in sp_opensocket()


Corresponding to flashrom svn r1775.
Signed-off-by: default avatarStefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
parent a9c23427
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment