CID1130009: Resource leak
The system resource will not be reclaimed and reused, reducing the future availability of the resource. In sp_opensocket: Leak of memory or pointers to system resources
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Index: serprog.c =================================================================== --- serprog.c (revision 1763) +++ serprog.c (working copy) @@ -100,6 +100,7 @@ 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; }
On Tue, 19 Nov 2013 20:35:57 +0100 Stefan Reinauer stefan.reinauer@coreboot.org wrote:
CID1130009: Resource leak
The system resource will not be reclaimed and reused, reducing the future availability of the resource. In sp_opensocket: Leak of memory or pointers to system resources
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Index: serprog.c
--- serprog.c (revision 1763) +++ serprog.c (working copy) @@ -100,6 +100,7 @@ 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;
Acked-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at and committed in r1775, thanks!