Don't leak file desciptors in this (impossible?) error case.
authorAndrew Bartlett <abartlet@samba.org>
Sat, 7 Sep 2002 06:04:28 +0000 (06:04 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 7 Sep 2002 06:04:28 +0000 (06:04 +0000)
(This used to be commit b440418f13b840860be42690bf475c1ee3cb3647)

source3/nsswitch/wb_common.c

index 0d1be4d5d1f6311b250d44930c7ad962d118f6fe..88bda4eabe33188362ca3a6e27cc8dab51064865 100644 (file)
@@ -98,6 +98,7 @@ static int make_nonstd_fd_internals(int fd, int limit /* Recursion limiter */)
                }
                /* Parinoia */
                if (new_fd < 3) {
+                       close(new_fd);
                        return -1;
                }
                close(fd);