Fixed Codesonar Bug 10128.60649: Leak
authorMatthias Wachs <wachs@net.in.tum.de>
Mon, 16 Aug 2010 09:35:54 +0000 (09:35 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Mon, 16 Aug 2010 09:35:54 +0000 (09:35 +0000)
src/transport/plugin_transport_http.c

index abeabd3a793224366c00daa4cf4690507939d1c6..b1e03abb3445629b1035a29beda0eda921b8cbc8 100644 (file)
@@ -608,12 +608,11 @@ process_interfaces (void *cls,
   else if ((af == AF_INET6) && (plugin->use_ipv6 == GNUNET_YES)  && (plugin->bind4_address == NULL))
     {
          struct in6_addr bnd_cmp6 = ((struct sockaddr_in6 *) addr)->sin6_addr;
-      t6 = GNUNET_malloc(sizeof(struct IPv6HttpAddress));
       if (IN6_IS_ADDR_LINKLOCAL (&((struct sockaddr_in6 *) addr)->sin6_addr))
         {
           return GNUNET_OK;
         }
-
+      t6 = GNUNET_malloc(sizeof(struct IPv6HttpAddress));
       if (plugin->bind6_address != NULL)
       {
          if (0 == memcmp(&plugin->bind6_address->sin6_addr, &bnd_cmp6, sizeof (struct in6_addr)))