Author: stefanct
Date: Sat Apr 26 18:12:03 2014
New Revision: 1775
URL: http://flashrom.org/trac/flashrom/changeset/1775

Log:
CID1130009: Resource leak in sp_opensocket().

Signed-off-by: Stefan Reinauer <[email protected]>
Acked-by: Stefan Tauner <[email protected]>

Modified:
   trunk/serprog.c

Modified: trunk/serprog.c
==============================================================================
--- trunk/serprog.c     Sat Apr 26 18:11:50 2014        (r1774)
+++ trunk/serprog.c     Sat Apr 26 18:12:03 2014        (r1775)
@@ -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;
                }

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to