Fixed an FD leak in the IPv6 address detection
authorAndreas Tonnesen <andreto@olsr.org>
Thu, 9 Sep 2004 04:51:09 +0000 (04:51 +0000)
committerAndreas Tonnesen <andreto@olsr.org>
Thu, 9 Sep 2004 04:51:09 +0000 (04:51 +0000)
src/interfaces.c

index ad655b5..e55ed18 100644 (file)
@@ -178,6 +178,7 @@ get_ipv6_address(char *ifname, struct sockaddr_in6 *saddr6, int scope_in)
                  olsr_printf(3, "IPv6 addr:\n");
                  inet_pton(AF_INET6,addr6,&tmp_sockaddr6);
                  memcpy(&saddr6->sin6_addr, &tmp_sockaddr6, sizeof(struct in6_addr));    
+                 fclose(f);
                  return 1;
                }
            }